package com.ems.remote.components;

import com.ems.bo.FrameBo;
import com.ems.bo.FramePointBo;
import com.ems.service.IBatteryBoxService;
import com.ems.service.IBatteryTempService;
import com.ems.service.IBatteryVoltageService;
import com.ems.service.IPcsService;
import com.ems.util.*;
import com.ems.vo.*;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import org.springframework.stereotype.Component;

import java.util.*;

/**
 * 遥测数据
 */
@Component
@Slf4j
public class PointStrategy {


    private static Map<String, List<FramePointBo>> map = new HashMap<> ();

    /**
     * 解析测点数据，去掉前缀和后缀
     * 命令码07遥测：
     * 00 00 ：总帧数，当前帧数
     * 00 ：上传测点个数
     * 00 00 00 00 00 00 ：前俩字节表示Id，后四字节表示遥测值
     * 命令码08遥信：
     * 00 00 ：总帧数，当前帧数
     * 00 ：上传测点个数
     * 00 00 00 ：前俩字节表示Id，后一字节表示遥测值
     *
     * @param frameBo：解析后的帧数据内容
     * @return
     */
    public static void action ( FrameBo frameBo, IPcsService iPcsService, IBatteryBoxService iBatteryBoxService ) {
        //先拿总包数和第几包
        log.info ( "命令码 {}, 设备地址 {}, 数据 {}", frameBo.getCommandCode (), frameBo.getDeviceAddress (), frameBo.getData () );
        int countFrame = HexUtil.hexToDecimal ( frameBo.getData (), 0, 1 );
        int currentFrame = HexUtil.hexToDecimal ( frameBo.getData (), 1, 1 );
        //1.拿到每帧数据的长度
        int number = HexUtil.hexToDecimal ( frameBo.getData (), 2, 1 );
        //截取数目之后的遥测数据的所有字节
        String substring = frameBo.getData ().substring ( 6 );
        //子设备地址
        String deviceAddress = frameBo.getDeviceAddress ();
        //总包全部拿到之后，统一解析入库
        List<FramePointBo> list = map.get ( deviceAddress );
        //如果是同一个客户端，则放到同一个List中
        if ( list == null || list.size () == 0 ) {
            // Map中没有客户端，要创建对应的List
            list = new ArrayList<> ();
            map.put ( deviceAddress, list );
            log.info ( "创建{}的List.", HexUtil.hexToDecimal ( deviceAddress, 0, 2 ) );
        }
        //存入每帧的测点数据
        FramePointBo framePointBo = new FramePointBo ( number, substring, frameBo.getCommandCode () );
        list.add ( framePointBo );
        log.info ( "{}总共{}帧, 第{}帧, list size->{}", HexUtil.hexToDecimal ( deviceAddress, 0, 2 ), countFrame, currentFrame, list.size () );
        if ( countFrame == list.size () && HexUtil.hexToDecimal ( deviceAddress, 0, 2 ) == EmsPointUtil.SALVE_BMS_DEVICE_ADDRESS ) {
            log.info ( "BMS已完成..." );
            log.info ( "共收{}的数据{}帧! 命令码 {}", HexUtil.hexToDecimal ( deviceAddress, 0, 2 ), list.size (), frameBo.getCommandCode () );
            List<AlarmVo> alarmVos = new ArrayList<> ();
            BatteryBoxVo batteryBoxVo = new BatteryBoxVo ();
            batteryBoxVo.setDeviceAddress ( deviceAddress );
            String batteryVoltage[] = new String[216]; //所有电池电压数组
            String batteryTemp[] = new String[60];//所有电池电感温度
            batteryBoxVo.setBatteryVoltage ( batteryVoltage );
            batteryBoxVo.setBatteryTemp ( batteryTemp );
            for ( int i = 0; i < countFrame; i++ ) {
                // BMS对象
                batteryBoxVo = parseBms ( list.get ( i ), batteryBoxVo, alarmVos, deviceAddress );
            }
            //处理电池电压和电池电感温度
            batteryBoxVo.setBatteryVoltageVo ( parseBatterVoltage ( batteryBoxVo ) );
            batteryBoxVo.setBatteryTempVo ( parseBatterTemp ( batteryBoxVo ) );
            iBatteryBoxService.saveSingle ( batteryBoxVo );
            log.info ( "清空List..." );
            map.remove ( deviceAddress );
        }
        if ( HexUtil.hexToDecimal ( deviceAddress, 0, 2 ) == EmsPointUtil.SALVE_PCS_DEVICE_ADDRESS && countFrame == list.size () ) {
            //log.info ( "共收{}的数据{}帧!", HexUtil.hexToDecimal ( deviceAddress, 0, 2 ), list.size () );
            PcsVo pcsVo = new PcsVo ();
            List<AlarmVo> alarmVos = new ArrayList<> ();
            List<PcsAlarmBitVo> pcsAlarmBitVos = new ArrayList<> (); //PCS所有故障字
            for ( int i = 0; i < countFrame; i++ ) {
                // 拿到每一帧的有效数据，去解析每一帧里的每个有效数据
                pcsVo = parsePcs ( list.get ( i ), pcsVo, pcsAlarmBitVos, alarmVos, deviceAddress );
            }
            iPcsService.saveSingle ( pcsVo );
            //log.info ( "清空List..." );
            map.remove ( deviceAddress );
        }
    }


    /**
     * 组装PCS数据
     * 根据子设备地址确定是哪种子设备
     * 区分07遥测和08遥信
     * 07遥测测点值是四字节，08遥信测点值是一字节
     *
     * @param framePointBo
     * @param pcsVo
     */
    private static PcsVo parsePcs ( FramePointBo framePointBo, PcsVo pcsVo, List<PcsAlarmBitVo> pcsAlarmBitVos, List<AlarmVo> alarmVos, String deviceAddress ) {
        log.info ( "解析pcs->{}, {}, {}", framePointBo.getData (), framePointBo.getGroupNumber (), framePointBo.getCommandCode () );
        pcsVo.setDeviceAddress ( String.valueOf ( HexUtil.hexToDecimal ( deviceAddress, 0, 2 ) ) );
        for ( int i = 0; i < framePointBo.getGroupNumber (); i++ ) {
            //测点ID，两个字节，根据该测点以及
            int index = framePointBo.getCommandCode ().equals ( "08" ) ? 3 : 6;
            int length = framePointBo.getCommandCode ().equals ( "08" ) ? 1 : 4;
            int pointId = HexUtil.hexToDecimal ( framePointBo.getData (), i * index, 2 );
            //测点值，四个字节
            int value = HexUtil.hexToDecimal ( framePointBo.getData (), i * index + 2, length );
            if ( pointId == EmsPointUtil.PCS_OUT_A_VOLTAGE ) {
                pcsVo.setAVoltage ( CommonUtil.parseIntToStr ( value ) );
            } else if ( pointId == EmsPointUtil.PCS_OUT_B_VOLTAGE ) {
                pcsVo.setBVoltage ( CommonUtil.parseIntToStr ( value ) );
            } else if ( pointId == EmsPointUtil.PCS_OUT_C_VOLTAGE ) {
                pcsVo.setCVoltage ( CommonUtil.parseIntToStr ( value ) );
            } else if ( pointId == EmsPointUtil.PCS_OUT_A_CURRENT ) {
                pcsVo.setACurrent ( CommonUtil.parseIntToStr ( value ) );
            } else if ( pointId == EmsPointUtil.PCS_OUT_B_CURRENT ) {
                pcsVo.setBCurrent ( CommonUtil.parseIntToStr ( value ) );
            } else if ( pointId == EmsPointUtil.PCS_OUT_C_CURRENT ) {
                pcsVo.setCCurrent ( CommonUtil.parseIntToStr ( value ) );
            } else if ( pointId == EmsPointUtil.PCS_GRID_FREQUENCY ) {
                pcsVo.setPowerRate ( CommonUtil.parseIntToStr ( value ) );
            } else if ( pointId == EmsPointUtil.PCS_BATTERY_VOLTAGE ) {
                pcsVo.setBatteryVoltage ( CommonUtil.parseIntToStr ( value ) );
            } else if ( pointId == EmsPointUtil.PCS_BATTERY_CURRENT ) {
                pcsVo.setBatteryCurrent ( CommonUtil.parseIntToStr ( value ) );
            } else if ( pointId == EmsPointUtil.PCS_DC_POWER ) {
                pcsVo.setDcPower ( CommonUtil.parseIntToStr ( value ) );
            } else if ( pointId == EmsPointUtil.PCS_AC_OUT_POWER ) {
                pcsVo.setAcTotalApparentPower ( CommonUtil.parseIntToStr ( value ) );
            } else if ( pointId == EmsPointUtil.PCS_AC_OUT_ACTIVE_POWER ) {
                pcsVo.setAcTotalActivePower ( CommonUtil.parseIntToStr ( value ) );
            } else if ( pointId == EmsPointUtil.PCS_AC_OUT_REACTIVE_POWER ) {
                pcsVo.setAcTotalReactivePower ( CommonUtil.parseIntToStr ( value ) );
            } else if ( pointId == EmsPointUtil.PCS_WORK_STATUS ) {
                //0000 0000停机；0000 0001开机中；0000 0010待机；0000 1001或1000 0001运行；0100 0000故障
                pcsVo.setWorkStatus ( value );
            } else if ( pointId == EmsPointUtil.PCS_AMBIENT_TEMP ) {
                pcsVo.setAmbientTemp ( CommonUtil.parseIntToStr ( value ) );
            } else if ( pointId == EmsPointUtil.PCS_AC_POWER_FACTOR ) {
                pcsVo.setACPowerFactor ( CommonUtil.parseIntToStr ( value ) );
            } else if ( pointId == EmsPointUtil.PCS_AC_A_APP_POWER ) {
                pcsVo.setAApparentPower ( CommonUtil.parseIntToStr ( value ) );
            } else if ( pointId == EmsPointUtil.PCS_AC_B_APP_POWER ) {
                pcsVo.setBApparentPower ( CommonUtil.parseIntToStr ( value ) );
            } else if ( pointId == EmsPointUtil.PCS_AC_C_APP_POWER ) {
                pcsVo.setCApparentPower ( CommonUtil.parseIntToStr ( value ) );
            } else if ( pointId == EmsPointUtil.PCS_AC_A_ACTIVE_POWER ) {
                pcsVo.setAActivePower ( CommonUtil.parseIntToStr ( value ) );
            } else if ( pointId == EmsPointUtil.PCS_AC_B_ACTIVE_POWER ) {
                pcsVo.setBActivePower ( CommonUtil.parseIntToStr ( value ) );
            } else if ( pointId == EmsPointUtil.PCS_AC_C_ACTIVE_POWER ) {
                pcsVo.setCActivePower ( CommonUtil.parseIntToStr ( value ) );
            } else if ( pointId == EmsPointUtil.PCS_AC_A_APP_REACTIVE_POWER ) {
                pcsVo.setAReactivePower ( CommonUtil.parseIntToStr ( value ) );
            } else if ( pointId == EmsPointUtil.PCS_AC_B_APP_REACTIVE_POWER ) {
                pcsVo.setBReactivePower ( CommonUtil.parseIntToStr ( value ) );
            } else if ( pointId == EmsPointUtil.PCS_AC_C_APP_REACTIVE_POWER ) {
                pcsVo.setCReactivePower ( CommonUtil.parseIntToStr ( value ) );
            } else if ( pointId == EmsPointUtil.PCS_OUT_AB_VOLTAGE ) {
                pcsVo.setOutABVoltage ( CommonUtil.parseIntToStr ( value ) );
            } else if ( pointId == EmsPointUtil.PCS_OUT_BC_VOLTAGE ) {
                pcsVo.setOutBCVoltage ( CommonUtil.parseIntToStr ( value ) );
            } else if ( pointId == EmsPointUtil.PCS_OUT_AC_VOLTAGE ) {
                pcsVo.setOutACVoltage ( CommonUtil.parseIntToStr ( value ) );
            } else if ( pointId == EmsPointUtil.PCS_INDUCTANCE_A_CURRENT ) {
                pcsVo.setInductanceACurrent ( CommonUtil.parseIntToStr ( value ) );
            } else if ( pointId == EmsPointUtil.PCS_INDUCTANCE_B_CURRENT ) {
                pcsVo.setInductanceBCurrent ( CommonUtil.parseIntToStr ( value ) );
            } else if ( pointId == EmsPointUtil.PCS_INDUCTANCE_C_CURRENT ) {
                pcsVo.setInductanceCCurrent ( CommonUtil.parseIntToStr ( value ) );
            } else if ( pointId == EmsPointUtil.PCS_POWER_GRID_SEQUENCE ) {
                pcsVo.setPowerSequence ( CommonUtil.parseIntToStr ( value ) );
            } else if ( pointId == EmsPointUtil.PCS_BUS_VOLTAGE ) {
                pcsVo.setTotalBusVoltage ( CommonUtil.parseIntToStr ( value ) );
            } else if ( pointId == EmsPointUtil.PCS_JUST_BUS_VOLTAGE ) {
                pcsVo.setPositiveBusVoltage ( CommonUtil.parseIntToStr ( value ) );
            } else if ( pointId == EmsPointUtil.PCS_SUB_BUS_VOLTAGE ) {
                pcsVo.setNegativeBusVoltage ( CommonUtil.parseIntToStr ( value ) );
            } else if ( pointId == EmsPointUtil.PCS_DC_TOTAL_CURRENT ) {
                pcsVo.setDcTotalCurrent ( CommonUtil.parseIntToStr ( value ) );
            } else if ( pointId == EmsPointUtil.PCS_INDUCTANCE_TEMP ) {
                pcsVo.setInductanceTemp ( CommonUtil.parseIntToStr ( value ) );
            } else if ( pointId == EmsPointUtil.PCS_IGBT_TEMP ) {
                pcsVo.setIGBTTemp ( CommonUtil.parseIntToStr ( value ) );
            } else if ( pointId == EmsPointUtil.PCS_HARD_FAIL_BIT_1 ) { //硬件故障字1
                PcsAlarmBitVo pcsAlarmBitVo = new PcsAlarmBitVo ( String.valueOf ( HexUtil.hexToDecimal ( deviceAddress, 0, 2 ) ) );
                pcsAlarmBitVo.setAlarmCode ( "1700" );
                pcsAlarmBitVo.setStatus ( 1 );
                pcsAlarmBitVo.setAlarmValue ( String.valueOf ( value ) );
                pcsAlarmBitVos.add ( pcsAlarmBitVo );
            } else if ( pointId == EmsPointUtil.PCS_HARD_FAIL_BIT_2 ) {
                PcsAlarmBitVo pcsAlarmBitVo = new PcsAlarmBitVo ( String.valueOf ( HexUtil.hexToDecimal ( deviceAddress, 0, 2 ) ) );
                pcsAlarmBitVo.setAlarmCode ( "1701" );
                pcsAlarmBitVo.setStatus ( 2 );
                pcsAlarmBitVo.setAlarmValue ( String.valueOf ( value ) );
                pcsAlarmBitVos.add ( pcsAlarmBitVo );
            } else if ( pointId == EmsPointUtil.PCS_POWER_FAIL_BIT ) {
                PcsAlarmBitVo pcsAlarmBitVo = new PcsAlarmBitVo ( String.valueOf ( HexUtil.hexToDecimal ( deviceAddress, 0, 2 ) ) );
                pcsAlarmBitVo.setAlarmCode ( "1702" );
                pcsAlarmBitVo.setStatus ( 3 );
                pcsAlarmBitVo.setAlarmValue ( String.valueOf ( value ) );
                pcsAlarmBitVos.add ( pcsAlarmBitVo );
            } else if ( pointId == EmsPointUtil.PCS_BUS_FAIL_BIT ) {
                PcsAlarmBitVo pcsAlarmBitVo = new PcsAlarmBitVo ( String.valueOf ( HexUtil.hexToDecimal ( deviceAddress, 0, 2 ) ) );
                pcsAlarmBitVo.setAlarmCode ( "1703" );
                pcsAlarmBitVo.setStatus ( 4 );
                pcsAlarmBitVo.setAlarmValue ( String.valueOf ( value ) );
                pcsAlarmBitVos.add ( pcsAlarmBitVo );
            } else if ( pointId == EmsPointUtil.PCS_AC_FAIL_BIT ) {
                PcsAlarmBitVo pcsAlarmBitVo = new PcsAlarmBitVo ( String.valueOf ( HexUtil.hexToDecimal ( deviceAddress, 0, 2 ) ) );
                pcsAlarmBitVo.setAlarmCode ( "1704" );
                pcsAlarmBitVo.setStatus ( 5 );
                pcsAlarmBitVo.setAlarmValue ( String.valueOf ( value ) );
                pcsAlarmBitVos.add ( pcsAlarmBitVo );
            } else if ( pointId == EmsPointUtil.PCS_SYSTEM_FAIL_BIT ) {
                PcsAlarmBitVo pcsAlarmBitVo = new PcsAlarmBitVo ( String.valueOf ( HexUtil.hexToDecimal ( deviceAddress, 0, 2 ) ) );
                pcsAlarmBitVo.setAlarmCode ( "1705" );
                pcsAlarmBitVo.setStatus ( 6 );
                pcsAlarmBitVo.setAlarmValue ( String.valueOf ( value ) );
                pcsAlarmBitVos.add ( pcsAlarmBitVo );
            } else if ( pointId == EmsPointUtil.PCS_ON_OFF_FAIL_BIT ) {
                PcsAlarmBitVo pcsAlarmBitVo = new PcsAlarmBitVo ( String.valueOf ( HexUtil.hexToDecimal ( deviceAddress, 0, 2 ) ) );
                pcsAlarmBitVo.setAlarmCode ( "1706" );
                pcsAlarmBitVo.setStatus ( 7 );
                pcsAlarmBitVo.setAlarmValue ( String.valueOf ( value ) );
                pcsAlarmBitVos.add ( pcsAlarmBitVo );
            } else if ( pointId == EmsPointUtil.PCS_OTHER_FAIL_BIT ) { //其他故障字
                PcsAlarmBitVo pcsAlarmBitVo = new PcsAlarmBitVo ( String.valueOf ( HexUtil.hexToDecimal ( deviceAddress, 0, 2 ) ) );
                pcsAlarmBitVo.setAlarmCode ( "1707" );
                pcsAlarmBitVo.setStatus ( 8 );
                pcsAlarmBitVo.setAlarmValue ( String.valueOf ( value ) );
                pcsAlarmBitVos.add ( pcsAlarmBitVo );
            } else if ( pointId == EmsPointUtil.PCS_ACTUAL_WORK_MODEL ) {
                //1：交流电流源模式（恒流、恒功率），0：直流电压源模式（ACDC 源使用）
                pcsVo.setActualWorkModel ( value );
            } else if ( pointId == EmsPointUtil.PCS_A_POWER_FACTOR ) {
                pcsVo.setAPowerFactor ( CommonUtil.parseIntToStr ( value ) );
            } else if ( pointId == EmsPointUtil.PCS_B_POWER_FACTOR ) {
                pcsVo.setBPowerFactor ( CommonUtil.parseIntToStr ( value ) );
            } else if ( pointId == EmsPointUtil.PCS_C_POWER_FACTOR ) {
                pcsVo.setCPowerFactor ( CommonUtil.parseIntToStr ( value ) );
            } else if ( pointId == EmsPointUtil.PCS_DC_HISTORY_CHARGE_AMOUNT ) {
                pcsVo.setDcHistoryChargeCapacity ( CommonUtil.parseIntToStr ( value ) );
            } else if ( pointId == EmsPointUtil.PCS_DC_DAY_CHARGE_AMOUNT ) {
                pcsVo.setDcDayChargeCapacity ( CommonUtil.parseIntToStr ( value ) );
            } else if ( pointId == EmsPointUtil.PCS_DC_HISTORY_DIS_CHARGE_AMOUNT ) {
                pcsVo.setDcHistoryDischargeCapacity ( CommonUtil.parseIntToStr ( value ) );
            } else if ( pointId == EmsPointUtil.PCS_DC_DAY_DIS_CHARGE_AMOUNT ) {
                pcsVo.setDcDayDischargeCapacity ( CommonUtil.parseIntToStr ( value ) );
            } else if ( pointId == EmsPointUtil.PCS_AC_HISTORY_CHARGE_AMOUNT ) {
                pcsVo.setAcHistoryChargeCapacity ( CommonUtil.parseIntToStr ( value ) );
            } else if ( pointId == EmsPointUtil.PCS_AC_DAY_CHARGE_AMOUNT ) {
                pcsVo.setAcDayChargeCapacity ( CommonUtil.parseIntToStr ( value ) );
            } else if ( pointId == EmsPointUtil.PCS_AC_HISTORY_DIS_CHARGE_AMOUNT ) {
                pcsVo.setAcHistoryDischargeCapacity ( CommonUtil.parseIntToStr ( value ) );
            } else if ( pointId == EmsPointUtil.PCS_AC_DAY_DIS_CHARGE__AMOUNT ) {
                pcsVo.setAcDayDischargeCapacity ( CommonUtil.parseIntToStr ( value ) );
            }
            // 所有警告标志为1时则有警告
            if ( pointId >= EmsPointUtil.PCS_IGBT_HARD_OVER_CURRENT_FLAG && pointId <= EmsPointUtil.PCS_LOW_VOLTAGE_OVER_TIME_FLAG ) {
                // 所有警告测点都进来，根据value是否为1断定是否有警告
                if ( value == 1 ) {
                    alarmVos = parseAlarm ( alarmVos, pointId, deviceAddress, 2 );
                }
            }
        }
        pcsVo.setAlarmVoList ( alarmVos );
        pcsVo.setPcsAlarmBitVoList ( pcsAlarmBitVos );
        return pcsVo;
    }

    /**
     * 组装BMS数据
     *
     * @param framePointBo
     * @param batteryBoxVo
     */
    private static BatteryBoxVo parseBms ( FramePointBo framePointBo, BatteryBoxVo batteryBoxVo, List<AlarmVo> alarmVos, String deviceAddress ) {
        log.info ( "解析bms->{}, {}, {}", framePointBo.getData (), framePointBo.getGroupNumber (), framePointBo.getCommandCode () );
        batteryBoxVo.setDeviceAddress ( String.valueOf ( HexUtil.hexToDecimal ( deviceAddress, 0, 2 ) ) );
        String[] batteryVoltage = batteryBoxVo.getBatteryVoltage ();
        String[] batteryTemp = batteryBoxVo.getBatteryTemp ();
        int totalDischargeAmount = 0; //累计放电能量
        int totalChargeAmount = 0;//累计充电能量
        int dayDischargeAmount = 0; //今天放电能量
        int dayChargeAmount = 0;//今天充电能量
        for ( int i = 0; i < framePointBo.getGroupNumber (); i++ ) {
            int index = framePointBo.getCommandCode ().equals ( "08" ) ? 3 : 6;
            int length = framePointBo.getCommandCode ().equals ( "08" ) ? 1 : 4;
            //测点ID，两个字节，根据该测点以及
            int pointId = HexUtil.hexToDecimal ( framePointBo.getData (), i * index, 2 );
            //测点值，四个字节
            int value = HexUtil.hexToDecimal ( framePointBo.getData (), i * index + 2, length );
            if ( pointId == EmsPointUtil.SOC ) {
                batteryBoxVo.setSoc ( CommonUtil.parseIntToStr ( value ) );
            } else if ( pointId == EmsPointUtil.BATTERY_TOTAL_VOLTAGE ) {
                batteryBoxVo.setVoltage ( CommonUtil.parseIntToStr ( value ) );
            } else if ( pointId == EmsPointUtil.BATTERY_CURRENT_ABSOLUTE ) {
                batteryBoxVo.setBatteryCurrentAbsolute ( CommonUtil.parseIntToStr ( value ) );
            } else if ( pointId == EmsPointUtil.MAX_SINGLE_VOLTAGE ) {
                batteryBoxVo.setMaxVoltage ( CommonUtil.parseIntToStr ( value ) );
            } else if ( pointId == EmsPointUtil.MIN_SINGLE_VOLTAGE ) {
                batteryBoxVo.setMinVoltage ( CommonUtil.parseIntToStr ( value ) );
            } else if ( pointId == EmsPointUtil.AVG_SINGLE_VOLTAGE ) {
                batteryBoxVo.setAvgVoltage ( CommonUtil.parseIntToStr ( value ) );
            } else if ( pointId == EmsPointUtil.MAX_TEMP ) {
                batteryBoxVo.setMaxTemp ( CommonUtil.parseIntToStr ( value ) );
            } else if ( pointId == EmsPointUtil.MIN_TEMP ) {
                batteryBoxVo.setMinTemp ( CommonUtil.parseIntToStr ( value ) );
            } else if ( pointId == EmsPointUtil.AVG_TEMP ) {
                batteryBoxVo.setAvgTemp ( CommonUtil.parseIntToStr ( value ) );
            } else if ( pointId == EmsPointUtil.MAX_SINGLE_NUMBER ) {
                batteryBoxVo.setMaxSingleNumber ( CommonUtil.parseIntToStr ( value ) );
            } else if ( pointId == EmsPointUtil.MIN_SINGLE_NUMBER ) {
                batteryBoxVo.setMinSingleNumber ( CommonUtil.parseIntToStr ( value ) );
            } else if ( pointId == EmsPointUtil.MAX_TEMP_NUMBER ) {
                batteryBoxVo.setMaxTempNumber ( CommonUtil.parseIntToStr ( value ) );
            } else if ( pointId == EmsPointUtil.MIN_TEMP_NUMBER ) {
                batteryBoxVo.setMinTempNumber ( CommonUtil.parseIntToStr ( value ) );
            } else if ( pointId == EmsPointUtil.BATTERY_VOLTAGE_DIFF ) {
                batteryBoxVo.setBatteryVoltageDiff ( CommonUtil.parseIntToStr ( value ) );
            } else if ( pointId == EmsPointUtil.BATTERY_TEMP_DIFF ) {
                batteryBoxVo.setBatteryTempDiff ( CommonUtil.parseIntToStr ( value ) );
            } else if ( pointId == EmsPointUtil.BATTERY_CURRENT ) {
                batteryBoxVo.setCurrent ( CommonUtil.parseIntToStr ( value ) );
            } else if ( pointId == EmsPointUtil.UN_CHARGE_FLAG ) {

            } else if ( pointId == EmsPointUtil.UN_DISCHARGE_FLAG ) {

            } else if ( pointId == EmsPointUtil.MAX_ALLOW_CHARGE_VOLTAGE ) {

            } else if ( pointId == EmsPointUtil.MAX_ALLOW_CHARGE_CURRENT ) {

            } else if ( pointId == EmsPointUtil.MAX_ALLOW_DISCHARGE_CURRENT ) {

            } else if ( pointId == EmsPointUtil.BATTERY_CAPACITY ) {
                batteryBoxVo.setBatteryRatedCapacity ( CommonUtil.parseIntToStr ( value ) );
            } else if ( pointId == EmsPointUtil.BATTERY_SURPLUS ) {
                batteryBoxVo.setResidueAmount ( CommonUtil.parseIntToStr ( value ) );
            } else if ( pointId == EmsPointUtil.MAX_SETUP_SALVE_NUMBER ) {

            } else if ( pointId == EmsPointUtil.MIN_SETUP_SALVE_NUMBER ) {

            } else if ( pointId == EmsPointUtil.ON_LINE_SALVE_NUMBER ) {

            } else if ( pointId == EmsPointUtil.SALVE_ID_STATUS ) {

            } else if ( pointId == EmsPointUtil.CHARGE_DISCHARGE_STATUS ) {

            } else if ( pointId == EmsPointUtil.SALVE_SINGLE_DISPLAY_BIT ) {

            } else if ( pointId == EmsPointUtil.RELAY_STATUS ) {

            } else if ( pointId == EmsPointUtil.SYSTEM_STATUS ) {
                batteryBoxVo.setStatus ( value );// 系统状态
            } else if ( pointId == EmsPointUtil.SALVE_COMM_STATUS ) {
                batteryBoxVo.setSalveCommStatus ( value );// 系统状态
            } else if ( pointId == EmsPointUtil.V_BAT_HIGH_VOLTAGE ) {

            } else if ( pointId == EmsPointUtil.HV1_HIGH_VOLTAGE ) {

            } else if ( pointId == EmsPointUtil.HV2_HIGH_VOLTAGE ) {

            } else if ( pointId == EmsPointUtil.TOTAL_CHANGE_LOW ) {
                totalChargeAmount += value;
            } else if ( pointId == EmsPointUtil.TOTAL_CHANGE_HIGH ) {
                totalChargeAmount += value * 16;
            } else if ( pointId == EmsPointUtil.TOTAL_DIS_CHANGE_LOW ) {
                totalDischargeAmount += value;
            } else if ( pointId == EmsPointUtil.TOTAL_DIS_CHANGE_HIGH ) {
                totalDischargeAmount += value * 16;
            } else if ( pointId == EmsPointUtil.TOTAL_CHANGE_TIME_LOW ) {

            } else if ( pointId == EmsPointUtil.TOTAL_CHANGE_TIME_HIGH ) {

            } else if ( pointId == EmsPointUtil.TOTAL_DIS_CHANGE_TIME_LOW ) {

            } else if ( pointId == EmsPointUtil.TOTAL_DIS_CHANGE_TIME_HIGH ) {

            } else if ( pointId == EmsPointUtil.TOTAL_DIS_CHANGE_AMOUNT_LOW ) {

            } else if ( pointId == EmsPointUtil.TOTAL_DIS_CHANGE_AMOUNT_HIGH ) {

            } else if ( pointId == EmsPointUtil.TOTAL_CHANGE_AMOUNT_LOW ) {

            } else if ( pointId == EmsPointUtil.TOTAL_CHANGE_AMOUNT_HIGH ) {

            } else if ( pointId == EmsPointUtil.THIS_CHANGE_LOW ) {

            } else if ( pointId == EmsPointUtil.THIS_CHANGE_HIGH ) {

            } else if ( pointId == EmsPointUtil.THIS_DIS_CHANGE_LOW ) {
                dayDischargeAmount += value;
            } else if ( pointId == EmsPointUtil.THIS_DIS_CHANGE_HIGH ) {
                dayDischargeAmount += value * 16;
            } else if ( pointId == EmsPointUtil.THIS_CHANGE_TIME_LOW ) {

            } else if ( pointId == EmsPointUtil.THIS_CHANGE_TIME_HIGH ) {

            } else if ( pointId == EmsPointUtil.THIS_DIS_CHANGE_TIME_LOW ) {

            } else if ( pointId == EmsPointUtil.THIS_DIS_CHANGE_TIME_HIGH ) {

            } else if ( pointId == EmsPointUtil.THIS_DIS_CHANGE_AMOUNT_LOW ) {

            } else if ( pointId == EmsPointUtil.THIS_DIS_CHANGE_AMOUNT_HIGH ) {

            } else if ( pointId == EmsPointUtil.THIS_CHANGE_AMOUNT_LOW ) {
                dayChargeAmount += value;
            } else if ( pointId == EmsPointUtil.THIS_CHANGE_AMOUNT_HIGH ) {
                dayChargeAmount += value * 16;
            } else if ( pointId == EmsPointUtil.ALARM_CHARGE_3_LEVEL_HIGH ) {

            } else if ( pointId == EmsPointUtil.ALARM_CHARGE_3_LEVEL_LOW ) {

            } else if ( pointId == EmsPointUtil.RTC_YEAR ) {

            } else if ( pointId == EmsPointUtil.RTC_MONTH ) {

            } else if ( pointId == EmsPointUtil.RTC_DAY ) {

            } else if ( pointId == EmsPointUtil.RTC_HOUR ) {

            } else if ( pointId == EmsPointUtil.RTC_MIN ) {

            } else if ( pointId == EmsPointUtil.RTC_SEC ) {

            } else if ( pointId == EmsPointUtil.VOLTAGE_SINGLE_1 ) {
                batteryVoltage[0] = CommonUtil.parseIntToStr ( value );
            } else if ( pointId == EmsPointUtil.VOLTAGE_SINGLE_2 ) {
                batteryVoltage[1] = CommonUtil.parseIntToStr ( value );
            } else if ( pointId == EmsPointUtil.VOLTAGE_SINGLE_3 ) {
                batteryVoltage[2] = CommonUtil.parseIntToStr ( value );
            } else if ( pointId == EmsPointUtil.VOLTAGE_SINGLE_4 ) {
                batteryVoltage[3] = CommonUtil.parseIntToStr ( value );
            } else if ( pointId == EmsPointUtil.VOLTAGE_SINGLE_5 ) {
                batteryVoltage[4] = CommonUtil.parseIntToStr ( value );
            } else if ( pointId == EmsPointUtil.VOLTAGE_SINGLE_6 ) {
                batteryVoltage[5] = CommonUtil.parseIntToStr ( value );
            } else if ( pointId == EmsPointUtil.VOLTAGE_SINGLE_7 ) {
                batteryVoltage[6] = CommonUtil.parseIntToStr ( value );
            } else if ( pointId == EmsPointUtil.VOLTAGE_SINGLE_8 ) {
                batteryVoltage[7] = CommonUtil.parseIntToStr ( value );
            } else if ( pointId == EmsPointUtil.VOLTAGE_SINGLE_9 ) {
                batteryVoltage[8] = CommonUtil.parseIntToStr ( value );
            } else if ( pointId == EmsPointUtil.VOLTAGE_SINGLE_10 ) {
                batteryVoltage[9] = CommonUtil.parseIntToStr ( value );
            } else if ( pointId == EmsPointUtil.VOLTAGE_SINGLE_11 ) {
                batteryVoltage[10] = CommonUtil.parseIntToStr ( value );
            } else if ( pointId == EmsPointUtil.VOLTAGE_SINGLE_12 ) {
                batteryVoltage[11] = CommonUtil.parseIntToStr ( value );
            } else if ( pointId == EmsPointUtil.VOLTAGE_SINGLE_13 ) {
                batteryVoltage[12] = CommonUtil.parseIntToStr ( value );
            } else if ( pointId == EmsPointUtil.VOLTAGE_SINGLE_14 ) {
                batteryVoltage[13] = CommonUtil.parseIntToStr ( value );
            } else if ( pointId == EmsPointUtil.VOLTAGE_SINGLE_15 ) {
                batteryVoltage[14] = CommonUtil.parseIntToStr ( value );
            } else if ( pointId == EmsPointUtil.VOLTAGE_SINGLE_16 ) {
                batteryVoltage[15] = CommonUtil.parseIntToStr ( value );
            } else if ( pointId == EmsPointUtil.VOLTAGE_SINGLE_17 ) {
                batteryVoltage[16] = CommonUtil.parseIntToStr ( value );
            } else if ( pointId == EmsPointUtil.VOLTAGE_SINGLE_18 ) {
                batteryVoltage[17] = CommonUtil.parseIntToStr ( value );
            } else if ( pointId == EmsPointUtil.VOLTAGE_SINGLE_19 ) {
                batteryVoltage[18] = CommonUtil.parseIntToStr ( value );
            } else if ( pointId == EmsPointUtil.VOLTAGE_SINGLE_20 ) {
                batteryVoltage[19] = CommonUtil.parseIntToStr ( value );
            } else if ( pointId == EmsPointUtil.VOLTAGE_SINGLE_21 ) {
                batteryVoltage[20] = CommonUtil.parseIntToStr ( value );
            } else if ( pointId == EmsPointUtil.VOLTAGE_SINGLE_22 ) {
                batteryVoltage[21] = CommonUtil.parseIntToStr ( value );
            } else if ( pointId == EmsPointUtil.VOLTAGE_SINGLE_23 ) {
                batteryVoltage[22] = CommonUtil.parseIntToStr ( value );
            } else if ( pointId == EmsPointUtil.VOLTAGE_SINGLE_24 ) {
                batteryVoltage[23] = CommonUtil.parseIntToStr ( value );
            } else if ( pointId == EmsPointUtil.VOLTAGE_SINGLE_25 ) {
                batteryVoltage[24] = CommonUtil.parseIntToStr ( value );
            } else if ( pointId == EmsPointUtil.VOLTAGE_SINGLE_26 ) {
                batteryVoltage[25] = CommonUtil.parseIntToStr ( value );
            } else if ( pointId == EmsPointUtil.VOLTAGE_SINGLE_27 ) {
                batteryVoltage[26] = CommonUtil.parseIntToStr ( value );
            } else if ( pointId == EmsPointUtil.VOLTAGE_SINGLE_28 ) {
                batteryVoltage[27] = CommonUtil.parseIntToStr ( value );
            } else if ( pointId == EmsPointUtil.VOLTAGE_SINGLE_29 ) {
                batteryVoltage[28] = CommonUtil.parseIntToStr ( value );
            } else if ( pointId == EmsPointUtil.VOLTAGE_SINGLE_30 ) {
                batteryVoltage[29] = CommonUtil.parseIntToStr ( value );
            } else if ( pointId == EmsPointUtil.VOLTAGE_SINGLE_31 ) {
                batteryVoltage[30] = CommonUtil.parseIntToStr ( value );
            } else if ( pointId == EmsPointUtil.VOLTAGE_SINGLE_32 ) {
                batteryVoltage[31] = CommonUtil.parseIntToStr ( value );
            } else if ( pointId == EmsPointUtil.VOLTAGE_SINGLE_33 ) {
                batteryVoltage[32] = CommonUtil.parseIntToStr ( value );
            } else if ( pointId == EmsPointUtil.VOLTAGE_SINGLE_34 ) {
                batteryVoltage[33] = CommonUtil.parseIntToStr ( value );
            } else if ( pointId == EmsPointUtil.VOLTAGE_SINGLE_35 ) {
                batteryVoltage[34] = CommonUtil.parseIntToStr ( value );
            } else if ( pointId == EmsPointUtil.VOLTAGE_SINGLE_36 ) {
                batteryVoltage[35] = CommonUtil.parseIntToStr ( value );
            } else if ( pointId == EmsPointUtil.VOLTAGE_SINGLE_37 ) {
                batteryVoltage[36] = CommonUtil.parseIntToStr ( value );
            } else if ( pointId == EmsPointUtil.VOLTAGE_SINGLE_38 ) {
                batteryVoltage[37] = CommonUtil.parseIntToStr ( value );
            } else if ( pointId == EmsPointUtil.VOLTAGE_SINGLE_39 ) {
                batteryVoltage[38] = CommonUtil.parseIntToStr ( value );
            } else if ( pointId == EmsPointUtil.VOLTAGE_SINGLE_40 ) {
                batteryVoltage[39] = CommonUtil.parseIntToStr ( value );
            } else if ( pointId == EmsPointUtil.VOLTAGE_SINGLE_41 ) {
                batteryVoltage[40] = CommonUtil.parseIntToStr ( value );
            } else if ( pointId == EmsPointUtil.VOLTAGE_SINGLE_42 ) {
                batteryVoltage[41] = CommonUtil.parseIntToStr ( value );
            } else if ( pointId == EmsPointUtil.VOLTAGE_SINGLE_43 ) {
                batteryVoltage[42] = CommonUtil.parseIntToStr ( value );
            } else if ( pointId == EmsPointUtil.VOLTAGE_SINGLE_44 ) {
                batteryVoltage[43] = CommonUtil.parseIntToStr ( value );
            } else if ( pointId == EmsPointUtil.VOLTAGE_SINGLE_45 ) {
                batteryVoltage[44] = CommonUtil.parseIntToStr ( value );
            } else if ( pointId == EmsPointUtil.VOLTAGE_SINGLE_46 ) {
                batteryVoltage[45] = CommonUtil.parseIntToStr ( value );
            } else if ( pointId == EmsPointUtil.VOLTAGE_SINGLE_47 ) {
                batteryVoltage[46] = CommonUtil.parseIntToStr ( value );
            } else if ( pointId == EmsPointUtil.VOLTAGE_SINGLE_48 ) {
                batteryVoltage[47] = CommonUtil.parseIntToStr ( value );
            } else if ( pointId == EmsPointUtil.VOLTAGE_SINGLE_49 ) {
                batteryVoltage[48] = CommonUtil.parseIntToStr ( value );
            } else if ( pointId == EmsPointUtil.VOLTAGE_SINGLE_50 ) {
                batteryVoltage[49] = CommonUtil.parseIntToStr ( value );
            } else if ( pointId == EmsPointUtil.VOLTAGE_SINGLE_51 ) {
                batteryVoltage[50] = CommonUtil.parseIntToStr ( value );
            } else if ( pointId == EmsPointUtil.VOLTAGE_SINGLE_52 ) {
                batteryVoltage[51] = CommonUtil.parseIntToStr ( value );
            } else if ( pointId == EmsPointUtil.VOLTAGE_SINGLE_53 ) {
                batteryVoltage[52] = CommonUtil.parseIntToStr ( value );
            } else if ( pointId == EmsPointUtil.VOLTAGE_SINGLE_54 ) {
                batteryVoltage[53] = CommonUtil.parseIntToStr ( value );
            } else if ( pointId == EmsPointUtil.VOLTAGE_SINGLE_55 ) {
                batteryVoltage[54] = CommonUtil.parseIntToStr ( value );
            } else if ( pointId == EmsPointUtil.VOLTAGE_SINGLE_56 ) {
                batteryVoltage[55] = CommonUtil.parseIntToStr ( value );
            } else if ( pointId == EmsPointUtil.VOLTAGE_SINGLE_57 ) {
                batteryVoltage[56] = CommonUtil.parseIntToStr ( value );
            } else if ( pointId == EmsPointUtil.VOLTAGE_SINGLE_58 ) {
                batteryVoltage[57] = CommonUtil.parseIntToStr ( value );
            } else if ( pointId == EmsPointUtil.VOLTAGE_SINGLE_59 ) {
                batteryVoltage[58] = CommonUtil.parseIntToStr ( value );
            } else if ( pointId == EmsPointUtil.VOLTAGE_SINGLE_60 ) {
                batteryVoltage[59] = CommonUtil.parseIntToStr ( value );
            } else if ( pointId == EmsPointUtil.VOLTAGE_SINGLE_61 ) {
                batteryVoltage[60] = CommonUtil.parseIntToStr ( value );
            } else if ( pointId == EmsPointUtil.VOLTAGE_SINGLE_62 ) {
                batteryVoltage[61] = CommonUtil.parseIntToStr ( value );
            } else if ( pointId == EmsPointUtil.VOLTAGE_SINGLE_63 ) {
                batteryVoltage[62] = CommonUtil.parseIntToStr ( value );
            } else if ( pointId == EmsPointUtil.VOLTAGE_SINGLE_64 ) {
                batteryVoltage[63] = CommonUtil.parseIntToStr ( value );
            } else if ( pointId == EmsPointUtil.VOLTAGE_SINGLE_65 ) {
                batteryVoltage[64] = CommonUtil.parseIntToStr ( value );
            } else if ( pointId == EmsPointUtil.VOLTAGE_SINGLE_66 ) {
                batteryVoltage[65] = CommonUtil.parseIntToStr ( value );
            } else if ( pointId == EmsPointUtil.VOLTAGE_SINGLE_67 ) {
                batteryVoltage[66] = CommonUtil.parseIntToStr ( value );
            } else if ( pointId == EmsPointUtil.VOLTAGE_SINGLE_68 ) {
                batteryVoltage[67] = CommonUtil.parseIntToStr ( value );
            } else if ( pointId == EmsPointUtil.VOLTAGE_SINGLE_69 ) {
                batteryVoltage[68] = CommonUtil.parseIntToStr ( value );
            } else if ( pointId == EmsPointUtil.VOLTAGE_SINGLE_70 ) {
                batteryVoltage[69] = CommonUtil.parseIntToStr ( value );
            } else if ( pointId == EmsPointUtil.VOLTAGE_SINGLE_71 ) {
                batteryVoltage[70] = CommonUtil.parseIntToStr ( value );
            } else if ( pointId == EmsPointUtil.VOLTAGE_SINGLE_72 ) {
                batteryVoltage[71] = CommonUtil.parseIntToStr ( value );
            } else if ( pointId == EmsPointUtil.VOLTAGE_SINGLE_73 ) {
                batteryVoltage[72] = CommonUtil.parseIntToStr ( value );
            } else if ( pointId == EmsPointUtil.VOLTAGE_SINGLE_74 ) {
                batteryVoltage[73] = CommonUtil.parseIntToStr ( value );
            } else if ( pointId == EmsPointUtil.VOLTAGE_SINGLE_75 ) {
                batteryVoltage[74] = CommonUtil.parseIntToStr ( value );
            } else if ( pointId == EmsPointUtil.VOLTAGE_SINGLE_76 ) {
                batteryVoltage[75] = CommonUtil.parseIntToStr ( value );
            } else if ( pointId == EmsPointUtil.VOLTAGE_SINGLE_77 ) {
                batteryVoltage[76] = CommonUtil.parseIntToStr ( value );
            } else if ( pointId == EmsPointUtil.VOLTAGE_SINGLE_78 ) {
                batteryVoltage[77] = CommonUtil.parseIntToStr ( value );
            } else if ( pointId == EmsPointUtil.VOLTAGE_SINGLE_79 ) {
                batteryVoltage[78] = CommonUtil.parseIntToStr ( value );
            } else if ( pointId == EmsPointUtil.VOLTAGE_SINGLE_80 ) {
                batteryVoltage[79] = CommonUtil.parseIntToStr ( value );
            } else if ( pointId == EmsPointUtil.VOLTAGE_SINGLE_81 ) {
                batteryVoltage[80] = CommonUtil.parseIntToStr ( value );
            } else if ( pointId == EmsPointUtil.VOLTAGE_SINGLE_82 ) {
                batteryVoltage[81] = CommonUtil.parseIntToStr ( value );
            } else if ( pointId == EmsPointUtil.VOLTAGE_SINGLE_83 ) {
                batteryVoltage[82] = CommonUtil.parseIntToStr ( value );
            } else if ( pointId == EmsPointUtil.VOLTAGE_SINGLE_84 ) {
                batteryVoltage[83] = CommonUtil.parseIntToStr ( value );
            } else if ( pointId == EmsPointUtil.VOLTAGE_SINGLE_85 ) {
                batteryVoltage[84] = CommonUtil.parseIntToStr ( value );
            } else if ( pointId == EmsPointUtil.VOLTAGE_SINGLE_86 ) {
                batteryVoltage[85] = CommonUtil.parseIntToStr ( value );
            } else if ( pointId == EmsPointUtil.VOLTAGE_SINGLE_87 ) {
                batteryVoltage[86] = CommonUtil.parseIntToStr ( value );
            } else if ( pointId == EmsPointUtil.VOLTAGE_SINGLE_88 ) {
                batteryVoltage[87] = CommonUtil.parseIntToStr ( value );
            } else if ( pointId == EmsPointUtil.VOLTAGE_SINGLE_89 ) {
                batteryVoltage[88] = CommonUtil.parseIntToStr ( value );
            } else if ( pointId == EmsPointUtil.VOLTAGE_SINGLE_90 ) {
                batteryVoltage[89] = CommonUtil.parseIntToStr ( value );
            } else if ( pointId == EmsPointUtil.VOLTAGE_SINGLE_91 ) {
                batteryVoltage[90] = CommonUtil.parseIntToStr ( value );
            } else if ( pointId == EmsPointUtil.VOLTAGE_SINGLE_92 ) {
                batteryVoltage[91] = CommonUtil.parseIntToStr ( value );
            } else if ( pointId == EmsPointUtil.VOLTAGE_SINGLE_93 ) {
                batteryVoltage[92] = CommonUtil.parseIntToStr ( value );
            } else if ( pointId == EmsPointUtil.VOLTAGE_SINGLE_94 ) {
                batteryVoltage[93] = CommonUtil.parseIntToStr ( value );
            } else if ( pointId == EmsPointUtil.VOLTAGE_SINGLE_95 ) {
                batteryVoltage[94] = CommonUtil.parseIntToStr ( value );
            } else if ( pointId == EmsPointUtil.VOLTAGE_SINGLE_96 ) {
                batteryVoltage[95] = CommonUtil.parseIntToStr ( value );
            } else if ( pointId == EmsPointUtil.VOLTAGE_SINGLE_97 ) {
                batteryVoltage[96] = CommonUtil.parseIntToStr ( value );
            } else if ( pointId == EmsPointUtil.VOLTAGE_SINGLE_98 ) {
                batteryVoltage[97] = CommonUtil.parseIntToStr ( value );
            } else if ( pointId == EmsPointUtil.VOLTAGE_SINGLE_99 ) {
                batteryVoltage[98] = CommonUtil.parseIntToStr ( value );
            } else if ( pointId == EmsPointUtil.VOLTAGE_SINGLE_100 ) {
                batteryVoltage[99] = CommonUtil.parseIntToStr ( value );
            } else if ( pointId == EmsPointUtil.VOLTAGE_SINGLE_101 ) {
                batteryVoltage[100] = CommonUtil.parseIntToStr ( value );
            } else if ( pointId == EmsPointUtil.VOLTAGE_SINGLE_102 ) {
                batteryVoltage[101] = CommonUtil.parseIntToStr ( value );
            } else if ( pointId == EmsPointUtil.VOLTAGE_SINGLE_103 ) {
                batteryVoltage[102] = CommonUtil.parseIntToStr ( value );
            } else if ( pointId == EmsPointUtil.VOLTAGE_SINGLE_104 ) {
                batteryVoltage[103] = CommonUtil.parseIntToStr ( value );
            } else if ( pointId == EmsPointUtil.VOLTAGE_SINGLE_105 ) {
                batteryVoltage[104] = CommonUtil.parseIntToStr ( value );
            } else if ( pointId == EmsPointUtil.VOLTAGE_SINGLE_106 ) {
                batteryVoltage[105] = CommonUtil.parseIntToStr ( value );
            } else if ( pointId == EmsPointUtil.VOLTAGE_SINGLE_107 ) {
                batteryVoltage[106] = CommonUtil.parseIntToStr ( value );
            } else if ( pointId == EmsPointUtil.VOLTAGE_SINGLE_108 ) {
                batteryVoltage[107] = CommonUtil.parseIntToStr ( value );
            } else if ( pointId == EmsPointUtil.VOLTAGE_SINGLE_109 ) {
                batteryVoltage[108] = CommonUtil.parseIntToStr ( value );
            } else if ( pointId == EmsPointUtil.VOLTAGE_SINGLE_110 ) {
                batteryVoltage[109] = CommonUtil.parseIntToStr ( value );
            } else if ( pointId == EmsPointUtil.VOLTAGE_SINGLE_111 ) {
                batteryVoltage[110] = CommonUtil.parseIntToStr ( value );
            } else if ( pointId == EmsPointUtil.VOLTAGE_SINGLE_112 ) {
                batteryVoltage[111] = CommonUtil.parseIntToStr ( value );
            } else if ( pointId == EmsPointUtil.VOLTAGE_SINGLE_113 ) {
                batteryVoltage[112] = CommonUtil.parseIntToStr ( value );
            } else if ( pointId == EmsPointUtil.VOLTAGE_SINGLE_114 ) {
                batteryVoltage[113] = CommonUtil.parseIntToStr ( value );
            } else if ( pointId == EmsPointUtil.VOLTAGE_SINGLE_115 ) {
                batteryVoltage[114] = CommonUtil.parseIntToStr ( value );
            } else if ( pointId == EmsPointUtil.VOLTAGE_SINGLE_116 ) {
                batteryVoltage[115] = CommonUtil.parseIntToStr ( value );
            } else if ( pointId == EmsPointUtil.VOLTAGE_SINGLE_117 ) {
                batteryVoltage[116] = CommonUtil.parseIntToStr ( value );
            } else if ( pointId == EmsPointUtil.VOLTAGE_SINGLE_118 ) {
                batteryVoltage[117] = CommonUtil.parseIntToStr ( value );
            } else if ( pointId == EmsPointUtil.VOLTAGE_SINGLE_119 ) {
                batteryVoltage[118] = CommonUtil.parseIntToStr ( value );
            } else if ( pointId == EmsPointUtil.VOLTAGE_SINGLE_120 ) {
                batteryVoltage[119] = CommonUtil.parseIntToStr ( value );
            } else if ( pointId == EmsPointUtil.VOLTAGE_SINGLE_121 ) {
                batteryVoltage[120] = CommonUtil.parseIntToStr ( value );
            } else if ( pointId == EmsPointUtil.VOLTAGE_SINGLE_122 ) {
                batteryVoltage[122] = CommonUtil.parseIntToStr ( value );
            } else if ( pointId == EmsPointUtil.VOLTAGE_SINGLE_123 ) {
                batteryVoltage[122] = CommonUtil.parseIntToStr ( value );
            } else if ( pointId == EmsPointUtil.VOLTAGE_SINGLE_124 ) {
                batteryVoltage[123] = CommonUtil.parseIntToStr ( value );
            } else if ( pointId == EmsPointUtil.VOLTAGE_SINGLE_125 ) {
                batteryVoltage[124] = CommonUtil.parseIntToStr ( value );
            } else if ( pointId == EmsPointUtil.VOLTAGE_SINGLE_126 ) {
                batteryVoltage[125] = CommonUtil.parseIntToStr ( value );
            } else if ( pointId == EmsPointUtil.VOLTAGE_SINGLE_127 ) {
                batteryVoltage[126] = CommonUtil.parseIntToStr ( value );
            } else if ( pointId == EmsPointUtil.VOLTAGE_SINGLE_128 ) {
                batteryVoltage[127] = CommonUtil.parseIntToStr ( value );
            } else if ( pointId == EmsPointUtil.VOLTAGE_SINGLE_129 ) {
                batteryVoltage[128] = CommonUtil.parseIntToStr ( value );
            } else if ( pointId == EmsPointUtil.VOLTAGE_SINGLE_130 ) {
                batteryVoltage[129] = CommonUtil.parseIntToStr ( value );
            } else if ( pointId == EmsPointUtil.VOLTAGE_SINGLE_131 ) {
                batteryVoltage[130] = CommonUtil.parseIntToStr ( value );
            } else if ( pointId == EmsPointUtil.VOLTAGE_SINGLE_132 ) {
                batteryVoltage[131] = CommonUtil.parseIntToStr ( value );
            } else if ( pointId == EmsPointUtil.VOLTAGE_SINGLE_133 ) {
                batteryVoltage[132] = CommonUtil.parseIntToStr ( value );
            } else if ( pointId == EmsPointUtil.VOLTAGE_SINGLE_134 ) {
                batteryVoltage[133] = CommonUtil.parseIntToStr ( value );
            } else if ( pointId == EmsPointUtil.VOLTAGE_SINGLE_135 ) {
                batteryVoltage[134] = CommonUtil.parseIntToStr ( value );
            } else if ( pointId == EmsPointUtil.VOLTAGE_SINGLE_136 ) {
                batteryVoltage[135] = CommonUtil.parseIntToStr ( value );
            } else if ( pointId == EmsPointUtil.VOLTAGE_SINGLE_137 ) {
                batteryVoltage[136] = CommonUtil.parseIntToStr ( value );
            } else if ( pointId == EmsPointUtil.VOLTAGE_SINGLE_138 ) {
                batteryVoltage[137] = CommonUtil.parseIntToStr ( value );
            } else if ( pointId == EmsPointUtil.VOLTAGE_SINGLE_139 ) {
                batteryVoltage[138] = CommonUtil.parseIntToStr ( value );
            } else if ( pointId == EmsPointUtil.VOLTAGE_SINGLE_140 ) {
                batteryVoltage[139] = CommonUtil.parseIntToStr ( value );
            } else if ( pointId == EmsPointUtil.VOLTAGE_SINGLE_141 ) {
                batteryVoltage[140] = CommonUtil.parseIntToStr ( value );
            } else if ( pointId == EmsPointUtil.VOLTAGE_SINGLE_142 ) {
                batteryVoltage[141] = CommonUtil.parseIntToStr ( value );
            } else if ( pointId == EmsPointUtil.VOLTAGE_SINGLE_143 ) {
                batteryVoltage[142] = CommonUtil.parseIntToStr ( value );
            } else if ( pointId == EmsPointUtil.VOLTAGE_SINGLE_144 ) {
                batteryVoltage[143] = CommonUtil.parseIntToStr ( value );
            } else if ( pointId == EmsPointUtil.VOLTAGE_SINGLE_145 ) {
                batteryVoltage[144] = CommonUtil.parseIntToStr ( value );
            } else if ( pointId == EmsPointUtil.VOLTAGE_SINGLE_146 ) {
                batteryVoltage[145] = CommonUtil.parseIntToStr ( value );
            } else if ( pointId == EmsPointUtil.VOLTAGE_SINGLE_147 ) {
                batteryVoltage[146] = CommonUtil.parseIntToStr ( value );
            } else if ( pointId == EmsPointUtil.VOLTAGE_SINGLE_148 ) {
                batteryVoltage[147] = CommonUtil.parseIntToStr ( value );
            } else if ( pointId == EmsPointUtil.VOLTAGE_SINGLE_149 ) {
                batteryVoltage[148] = CommonUtil.parseIntToStr ( value );
            } else if ( pointId == EmsPointUtil.VOLTAGE_SINGLE_150 ) {
                batteryVoltage[149] = CommonUtil.parseIntToStr ( value );
            } else if ( pointId == EmsPointUtil.VOLTAGE_SINGLE_151 ) {
                batteryVoltage[150] = CommonUtil.parseIntToStr ( value );
            } else if ( pointId == EmsPointUtil.VOLTAGE_SINGLE_152 ) {
                batteryVoltage[151] = CommonUtil.parseIntToStr ( value );
            } else if ( pointId == EmsPointUtil.VOLTAGE_SINGLE_153 ) {
                batteryVoltage[152] = CommonUtil.parseIntToStr ( value );
            } else if ( pointId == EmsPointUtil.VOLTAGE_SINGLE_154 ) {
                batteryVoltage[153] = CommonUtil.parseIntToStr ( value );
            } else if ( pointId == EmsPointUtil.VOLTAGE_SINGLE_155 ) {
                batteryVoltage[154] = CommonUtil.parseIntToStr ( value );
            } else if ( pointId == EmsPointUtil.VOLTAGE_SINGLE_156 ) {
                batteryVoltage[155] = CommonUtil.parseIntToStr ( value );
            } else if ( pointId == EmsPointUtil.VOLTAGE_SINGLE_157 ) {
                batteryVoltage[156] = CommonUtil.parseIntToStr ( value );
            } else if ( pointId == EmsPointUtil.VOLTAGE_SINGLE_158 ) {
                batteryVoltage[157] = CommonUtil.parseIntToStr ( value );
            } else if ( pointId == EmsPointUtil.VOLTAGE_SINGLE_159 ) {
                batteryVoltage[158] = CommonUtil.parseIntToStr ( value );
            } else if ( pointId == EmsPointUtil.VOLTAGE_SINGLE_160 ) {
                batteryVoltage[159] = CommonUtil.parseIntToStr ( value );
            } else if ( pointId == EmsPointUtil.VOLTAGE_SINGLE_161 ) {
                batteryVoltage[160] = CommonUtil.parseIntToStr ( value );
            } else if ( pointId == EmsPointUtil.VOLTAGE_SINGLE_162 ) {
                batteryVoltage[161] = CommonUtil.parseIntToStr ( value );
            } else if ( pointId == EmsPointUtil.VOLTAGE_SINGLE_163 ) {
                batteryVoltage[162] = CommonUtil.parseIntToStr ( value );
            } else if ( pointId == EmsPointUtil.VOLTAGE_SINGLE_164 ) {
                batteryVoltage[163] = CommonUtil.parseIntToStr ( value );
            } else if ( pointId == EmsPointUtil.VOLTAGE_SINGLE_165 ) {
                batteryVoltage[164] = CommonUtil.parseIntToStr ( value );
            } else if ( pointId == EmsPointUtil.VOLTAGE_SINGLE_166 ) {
                batteryVoltage[165] = CommonUtil.parseIntToStr ( value );
            } else if ( pointId == EmsPointUtil.VOLTAGE_SINGLE_167 ) {
                batteryVoltage[166] = CommonUtil.parseIntToStr ( value );
            } else if ( pointId == EmsPointUtil.VOLTAGE_SINGLE_168 ) {
                batteryVoltage[167] = CommonUtil.parseIntToStr ( value );
            } else if ( pointId == EmsPointUtil.VOLTAGE_SINGLE_169 ) {
                batteryVoltage[168] = CommonUtil.parseIntToStr ( value );
            } else if ( pointId == EmsPointUtil.VOLTAGE_SINGLE_170 ) {
                batteryVoltage[169] = CommonUtil.parseIntToStr ( value );
            } else if ( pointId == EmsPointUtil.VOLTAGE_SINGLE_171 ) {
                batteryVoltage[170] = CommonUtil.parseIntToStr ( value );
            } else if ( pointId == EmsPointUtil.VOLTAGE_SINGLE_172 ) {
                batteryVoltage[171] = CommonUtil.parseIntToStr ( value );
            } else if ( pointId == EmsPointUtil.VOLTAGE_SINGLE_173 ) {
                batteryVoltage[172] = CommonUtil.parseIntToStr ( value );
            } else if ( pointId == EmsPointUtil.VOLTAGE_SINGLE_174 ) {
                batteryVoltage[173] = CommonUtil.parseIntToStr ( value );
            } else if ( pointId == EmsPointUtil.VOLTAGE_SINGLE_175 ) {
                batteryVoltage[174] = CommonUtil.parseIntToStr ( value );
            } else if ( pointId == EmsPointUtil.VOLTAGE_SINGLE_176 ) {
                batteryVoltage[175] = CommonUtil.parseIntToStr ( value );
            } else if ( pointId == EmsPointUtil.VOLTAGE_SINGLE_177 ) {
                batteryVoltage[176] = CommonUtil.parseIntToStr ( value );
            } else if ( pointId == EmsPointUtil.VOLTAGE_SINGLE_178 ) {
                batteryVoltage[177] = CommonUtil.parseIntToStr ( value );
            } else if ( pointId == EmsPointUtil.VOLTAGE_SINGLE_179 ) {
                batteryVoltage[178] = CommonUtil.parseIntToStr ( value );
            } else if ( pointId == EmsPointUtil.VOLTAGE_SINGLE_180 ) {
                batteryVoltage[179] = CommonUtil.parseIntToStr ( value );
            } else if ( pointId == EmsPointUtil.VOLTAGE_SINGLE_181 ) {
                batteryVoltage[180] = CommonUtil.parseIntToStr ( value );
            } else if ( pointId == EmsPointUtil.VOLTAGE_SINGLE_182 ) {
                batteryVoltage[181] = CommonUtil.parseIntToStr ( value );
            } else if ( pointId == EmsPointUtil.VOLTAGE_SINGLE_183 ) {
                batteryVoltage[182] = CommonUtil.parseIntToStr ( value );
            } else if ( pointId == EmsPointUtil.VOLTAGE_SINGLE_184 ) {
                batteryVoltage[183] = CommonUtil.parseIntToStr ( value );
            } else if ( pointId == EmsPointUtil.VOLTAGE_SINGLE_185 ) {
                batteryVoltage[184] = CommonUtil.parseIntToStr ( value );
            } else if ( pointId == EmsPointUtil.VOLTAGE_SINGLE_186 ) {
                batteryVoltage[185] = CommonUtil.parseIntToStr ( value );
            } else if ( pointId == EmsPointUtil.VOLTAGE_SINGLE_187 ) {
                batteryVoltage[186] = CommonUtil.parseIntToStr ( value );
            } else if ( pointId == EmsPointUtil.VOLTAGE_SINGLE_188 ) {
                batteryVoltage[187] = CommonUtil.parseIntToStr ( value );
            } else if ( pointId == EmsPointUtil.VOLTAGE_SINGLE_189 ) {
                batteryVoltage[188] = CommonUtil.parseIntToStr ( value );
            } else if ( pointId == EmsPointUtil.VOLTAGE_SINGLE_190 ) {
                batteryVoltage[189] = CommonUtil.parseIntToStr ( value );
            } else if ( pointId == EmsPointUtil.VOLTAGE_SINGLE_191 ) {
                batteryVoltage[190] = CommonUtil.parseIntToStr ( value );
            } else if ( pointId == EmsPointUtil.VOLTAGE_SINGLE_192 ) {
                batteryVoltage[191] = CommonUtil.parseIntToStr ( value );
            } else if ( pointId == EmsPointUtil.VOLTAGE_SINGLE_193 ) {
                batteryVoltage[192] = CommonUtil.parseIntToStr ( value );
            } else if ( pointId == EmsPointUtil.VOLTAGE_SINGLE_194 ) {
                batteryVoltage[193] = CommonUtil.parseIntToStr ( value );
            } else if ( pointId == EmsPointUtil.VOLTAGE_SINGLE_195 ) {
                batteryVoltage[194] = CommonUtil.parseIntToStr ( value );
            } else if ( pointId == EmsPointUtil.VOLTAGE_SINGLE_196 ) {
                batteryVoltage[195] = CommonUtil.parseIntToStr ( value );
            } else if ( pointId == EmsPointUtil.VOLTAGE_SINGLE_197 ) {
                batteryVoltage[196] = CommonUtil.parseIntToStr ( value );
            } else if ( pointId == EmsPointUtil.VOLTAGE_SINGLE_198 ) {
                batteryVoltage[197] = CommonUtil.parseIntToStr ( value );
            } else if ( pointId == EmsPointUtil.VOLTAGE_SINGLE_199 ) {
                batteryVoltage[198] = CommonUtil.parseIntToStr ( value );
            } else if ( pointId == EmsPointUtil.VOLTAGE_SINGLE_200 ) {
                batteryVoltage[199] = CommonUtil.parseIntToStr ( value );
            } else if ( pointId == EmsPointUtil.VOLTAGE_SINGLE_201 ) {
                batteryVoltage[200] = CommonUtil.parseIntToStr ( value );
            } else if ( pointId == EmsPointUtil.VOLTAGE_SINGLE_202 ) {
                batteryVoltage[201] = CommonUtil.parseIntToStr ( value );
            } else if ( pointId == EmsPointUtil.VOLTAGE_SINGLE_203 ) {
                batteryVoltage[202] = CommonUtil.parseIntToStr ( value );
            } else if ( pointId == EmsPointUtil.VOLTAGE_SINGLE_204 ) {
                batteryVoltage[203] = CommonUtil.parseIntToStr ( value );
            } else if ( pointId == EmsPointUtil.VOLTAGE_SINGLE_205 ) {
                batteryVoltage[204] = CommonUtil.parseIntToStr ( value );
            } else if ( pointId == EmsPointUtil.VOLTAGE_SINGLE_206 ) {
                batteryVoltage[205] = CommonUtil.parseIntToStr ( value );
            } else if ( pointId == EmsPointUtil.VOLTAGE_SINGLE_207 ) {
                batteryVoltage[206] = CommonUtil.parseIntToStr ( value );
            } else if ( pointId == EmsPointUtil.VOLTAGE_SINGLE_208 ) {
                batteryVoltage[207] = CommonUtil.parseIntToStr ( value );
            } else if ( pointId == EmsPointUtil.VOLTAGE_SINGLE_209 ) {
                batteryVoltage[208] = CommonUtil.parseIntToStr ( value );
            } else if ( pointId == EmsPointUtil.VOLTAGE_SINGLE_210 ) {
                batteryVoltage[209] = CommonUtil.parseIntToStr ( value );
            } else if ( pointId == EmsPointUtil.VOLTAGE_SINGLE_211 ) {
                batteryVoltage[210] = CommonUtil.parseIntToStr ( value );
            } else if ( pointId == EmsPointUtil.VOLTAGE_SINGLE_212 ) {
                batteryVoltage[211] = CommonUtil.parseIntToStr ( value );
            } else if ( pointId == EmsPointUtil.VOLTAGE_SINGLE_213 ) {
                batteryVoltage[212] = CommonUtil.parseIntToStr ( value );
            } else if ( pointId == EmsPointUtil.VOLTAGE_SINGLE_214 ) {
                batteryVoltage[213] = CommonUtil.parseIntToStr ( value );
            } else if ( pointId == EmsPointUtil.VOLTAGE_SINGLE_215 ) {
                batteryVoltage[214] = CommonUtil.parseIntToStr ( value );
            } else if ( pointId == EmsPointUtil.VOLTAGE_SINGLE_216 ) {
                batteryVoltage[215] = CommonUtil.parseIntToStr ( value );
            } else if ( pointId == EmsPointUtil.TEMP_SENSOR_1 ) {
                batteryTemp[0] = CommonUtil.parseIntToStrTemp ( value );
            } else if ( pointId == EmsPointUtil.TEMP_SENSOR_2 ) {
                batteryTemp[1] = CommonUtil.parseIntToStrTemp ( value );
            } else if ( pointId == EmsPointUtil.TEMP_SENSOR_3 ) {
                batteryTemp[2] = CommonUtil.parseIntToStrTemp ( value );
            } else if ( pointId == EmsPointUtil.TEMP_SENSOR_4 ) {
                batteryTemp[3] = CommonUtil.parseIntToStrTemp ( value );
            } else if ( pointId == EmsPointUtil.TEMP_SENSOR_5 ) {
                batteryTemp[4] = CommonUtil.parseIntToStrTemp ( value );
            } else if ( pointId == EmsPointUtil.TEMP_SENSOR_6 ) {
                batteryTemp[5] = CommonUtil.parseIntToStrTemp ( value );
            } else if ( pointId == EmsPointUtil.TEMP_SENSOR_7 ) {
                batteryTemp[6] = CommonUtil.parseIntToStrTemp ( value );
            } else if ( pointId == EmsPointUtil.TEMP_SENSOR_8 ) {
                batteryTemp[7] = CommonUtil.parseIntToStrTemp ( value );
            } else if ( pointId == EmsPointUtil.TEMP_SENSOR_9 ) {
                batteryTemp[8] = CommonUtil.parseIntToStrTemp ( value );
            } else if ( pointId == EmsPointUtil.TEMP_SENSOR_10 ) {
                batteryTemp[9] = CommonUtil.parseIntToStrTemp ( value );
            } else if ( pointId == EmsPointUtil.TEMP_SENSOR_11 ) {
                batteryTemp[10] = CommonUtil.parseIntToStrTemp ( value );
            } else if ( pointId == EmsPointUtil.TEMP_SENSOR_12 ) {
                batteryTemp[11] = CommonUtil.parseIntToStrTemp ( value );
            } else if ( pointId == EmsPointUtil.TEMP_SENSOR_13 ) {
                batteryTemp[12] = CommonUtil.parseIntToStrTemp ( value );
            } else if ( pointId == EmsPointUtil.TEMP_SENSOR_14 ) {
                batteryTemp[13] = CommonUtil.parseIntToStrTemp ( value );
            } else if ( pointId == EmsPointUtil.TEMP_SENSOR_15 ) {
                batteryTemp[14] = CommonUtil.parseIntToStrTemp ( value );
            } else if ( pointId == EmsPointUtil.TEMP_SENSOR_16 ) {
                batteryTemp[15] = CommonUtil.parseIntToStrTemp ( value );
            } else if ( pointId == EmsPointUtil.TEMP_SENSOR_17 ) {
                batteryTemp[16] = CommonUtil.parseIntToStrTemp ( value );
            } else if ( pointId == EmsPointUtil.TEMP_SENSOR_18 ) {
                batteryTemp[17] = CommonUtil.parseIntToStrTemp ( value );
            } else if ( pointId == EmsPointUtil.TEMP_SENSOR_19 ) {
                batteryTemp[18] = CommonUtil.parseIntToStrTemp ( value );
            } else if ( pointId == EmsPointUtil.TEMP_SENSOR_20 ) {
                batteryTemp[19] = CommonUtil.parseIntToStrTemp ( value );
            } else if ( pointId == EmsPointUtil.TEMP_SENSOR_21 ) {
                batteryTemp[20] = CommonUtil.parseIntToStrTemp ( value );
            } else if ( pointId == EmsPointUtil.TEMP_SENSOR_22 ) {
                batteryTemp[21] = CommonUtil.parseIntToStrTemp ( value );
            } else if ( pointId == EmsPointUtil.TEMP_SENSOR_23 ) {
                batteryTemp[22] = CommonUtil.parseIntToStrTemp ( value );
            } else if ( pointId == EmsPointUtil.TEMP_SENSOR_24 ) {
                batteryTemp[23] = CommonUtil.parseIntToStrTemp ( value );
            } else if ( pointId == EmsPointUtil.TEMP_SENSOR_25 ) {
                batteryTemp[24] = CommonUtil.parseIntToStrTemp ( value );
            } else if ( pointId == EmsPointUtil.TEMP_SENSOR_26 ) {
                batteryTemp[25] = CommonUtil.parseIntToStrTemp ( value );
            } else if ( pointId == EmsPointUtil.TEMP_SENSOR_27 ) {
                batteryTemp[26] = CommonUtil.parseIntToStrTemp ( value );
            } else if ( pointId == EmsPointUtil.TEMP_SENSOR_28 ) {
                batteryTemp[27] = CommonUtil.parseIntToStrTemp ( value );
            } else if ( pointId == EmsPointUtil.TEMP_SENSOR_29 ) {
                batteryTemp[28] = CommonUtil.parseIntToStrTemp ( value );
            } else if ( pointId == EmsPointUtil.TEMP_SENSOR_30 ) {
                batteryTemp[29] = CommonUtil.parseIntToStrTemp ( value );
            } else if ( pointId == EmsPointUtil.TEMP_SENSOR_31 ) {
                batteryTemp[30] = CommonUtil.parseIntToStrTemp ( value );
            } else if ( pointId == EmsPointUtil.TEMP_SENSOR_32 ) {
                batteryTemp[31] = CommonUtil.parseIntToStrTemp ( value );
            } else if ( pointId == EmsPointUtil.TEMP_SENSOR_33 ) {
                batteryTemp[32] = CommonUtil.parseIntToStrTemp ( value );
            } else if ( pointId == EmsPointUtil.TEMP_SENSOR_34 ) {
                batteryTemp[33] = CommonUtil.parseIntToStrTemp ( value );
            } else if ( pointId == EmsPointUtil.TEMP_SENSOR_35 ) {
                batteryTemp[34] = CommonUtil.parseIntToStrTemp ( value );
            } else if ( pointId == EmsPointUtil.TEMP_SENSOR_36 ) {
                batteryTemp[35] = CommonUtil.parseIntToStrTemp ( value );
            } else if ( pointId == EmsPointUtil.TEMP_SENSOR_37 ) {
                batteryTemp[36] = CommonUtil.parseIntToStrTemp ( value );
            } else if ( pointId == EmsPointUtil.TEMP_SENSOR_38 ) {
                batteryTemp[37] = CommonUtil.parseIntToStrTemp ( value );
            } else if ( pointId == EmsPointUtil.TEMP_SENSOR_39 ) {
                batteryTemp[38] = CommonUtil.parseIntToStrTemp ( value );
            } else if ( pointId == EmsPointUtil.TEMP_SENSOR_40 ) {
                batteryTemp[39] = CommonUtil.parseIntToStrTemp ( value );
            } else if ( pointId == EmsPointUtil.TEMP_SENSOR_41 ) {
                batteryTemp[40] = CommonUtil.parseIntToStrTemp ( value );
            } else if ( pointId == EmsPointUtil.TEMP_SENSOR_42 ) {
                batteryTemp[41] = CommonUtil.parseIntToStrTemp ( value );
            } else if ( pointId == EmsPointUtil.TEMP_SENSOR_43 ) {
                batteryTemp[42] = CommonUtil.parseIntToStrTemp ( value );
            } else if ( pointId == EmsPointUtil.TEMP_SENSOR_44 ) {
                batteryTemp[43] = CommonUtil.parseIntToStrTemp ( value );
            } else if ( pointId == EmsPointUtil.TEMP_SENSOR_45 ) {
                batteryTemp[44] = CommonUtil.parseIntToStrTemp ( value );
            } else if ( pointId == EmsPointUtil.TEMP_SENSOR_46 ) {
                batteryTemp[45] = CommonUtil.parseIntToStrTemp ( value );
            } else if ( pointId == EmsPointUtil.TEMP_SENSOR_47 ) {
                batteryTemp[46] = CommonUtil.parseIntToStrTemp ( value );
            } else if ( pointId == EmsPointUtil.TEMP_SENSOR_48 ) {
                batteryTemp[47] = CommonUtil.parseIntToStrTemp ( value );
            } else if ( pointId == EmsPointUtil.TEMP_SENSOR_49 ) {
                batteryTemp[48] = CommonUtil.parseIntToStrTemp ( value );
            } else if ( pointId == EmsPointUtil.TEMP_SENSOR_50 ) {
                batteryTemp[49] = CommonUtil.parseIntToStrTemp ( value );
            } else if ( pointId == EmsPointUtil.TEMP_SENSOR_51 ) {
                batteryTemp[50] = CommonUtil.parseIntToStrTemp ( value );
            } else if ( pointId == EmsPointUtil.TEMP_SENSOR_52 ) {
                batteryTemp[51] = CommonUtil.parseIntToStrTemp ( value );
            } else if ( pointId == EmsPointUtil.TEMP_SENSOR_53 ) {
                batteryTemp[52] = CommonUtil.parseIntToStrTemp ( value );
            } else if ( pointId == EmsPointUtil.TEMP_SENSOR_54 ) {
                batteryTemp[53] = CommonUtil.parseIntToStrTemp ( value );
            } else if ( pointId == EmsPointUtil.TEMP_SENSOR_55 ) {
                batteryTemp[54] = CommonUtil.parseIntToStrTemp ( value );
            } else if ( pointId == EmsPointUtil.TEMP_SENSOR_56 ) {
                batteryTemp[55] = CommonUtil.parseIntToStrTemp ( value );
            } else if ( pointId == EmsPointUtil.TEMP_SENSOR_57 ) {
                batteryTemp[56] = CommonUtil.parseIntToStrTemp ( value );
            } else if ( pointId == EmsPointUtil.TEMP_SENSOR_58 ) {
                batteryTemp[57] = CommonUtil.parseIntToStrTemp ( value );
            } else if ( pointId == EmsPointUtil.TEMP_SENSOR_59 ) {
                batteryTemp[58] = CommonUtil.parseIntToStrTemp ( value );
            } else if ( pointId == EmsPointUtil.TEMP_SENSOR_60 ) {
                batteryTemp[59] = CommonUtil.parseIntToStrTemp ( value );
            }
            // 处理BMS警告
            if ( pointId >= EmsPointUtil.ALARM_CHARGE_3_LEVEL_SINGLE_HIGH && pointId <= EmsPointUtil.ALARM_INSULATION_FAULT_1_LEVEL ) {
                if ( value == 1 ) {
                    alarmVos = parseAlarm ( alarmVos, pointId, deviceAddress, 1 );
                }
            }
        }
        //处理下电压和温度
        batteryBoxVo.setBatteryVoltage ( batteryVoltage );
        batteryBoxVo.setBatteryTemp ( batteryTemp );
        //绑定BMS警告
        batteryBoxVo.setAlarmVoList ( alarmVos );

        batteryBoxVo.setTotalChargeAmount ( String.valueOf ( totalChargeAmount ) );
        batteryBoxVo.setTotalDischargeAmount ( String.valueOf ( totalDischargeAmount ) );
        batteryBoxVo.setDayChargeAmount ( String.valueOf ( dayChargeAmount ) );
        batteryBoxVo.setDayDischargeAmount ( String.valueOf ( dayDischargeAmount ) );
        return batteryBoxVo;
    }


    /**
     * 处理电池电压
     *
     * @param batteryBoxVo
     * @return
     */
    public static BatteryVoltageVo parseBatterVoltage ( BatteryBoxVo batteryBoxVo ) {
        String[] batteryVoltage = batteryBoxVo.getBatteryVoltage ();
        for ( int i = 0; i < batteryVoltage.length; i++ ) {
            if ( StringUtils.isBlank ( batteryVoltage[i] ) ) {
                batteryVoltage[i] = "0";
            }
        }
        BatteryVoltageVo batteryVoltageVo = new BatteryVoltageVo ();
        // 按十个一个字段
        StringBuilder stringBuilder = new StringBuilder ();
        StringBuilder batteryVoltage1 = stringBuilder.append ( batteryVoltage[0] ).append ( ";" ).append ( batteryVoltage[1] ).append ( ";" ).append ( batteryVoltage[2] ).append ( ";" ).append ( batteryVoltage[3] ).append ( ";" ).append ( batteryVoltage[4] ).append ( ";" ).append ( batteryVoltage[5] ).append ( ";" ).append ( batteryVoltage[6] ).append ( ";" ).append ( batteryVoltage[7] ).append ( ";" ).append ( batteryVoltage[8] ).append ( ";" ).append ( batteryVoltage[9] );
        stringBuilder = new StringBuilder ();
        StringBuilder batteryVoltage2 = stringBuilder.append ( batteryVoltage[10] ).append ( ";" ).append ( batteryVoltage[11] ).append ( ";" ).append ( batteryVoltage[12] ).append ( ";" ).append ( batteryVoltage[13] ).append ( ";" ).append ( batteryVoltage[14] ).append ( ";" ).append ( batteryVoltage[15] ).append ( ";" ).append ( batteryVoltage[16] ).append ( ";" ).append ( batteryVoltage[17] ).append ( ";" ).append ( batteryVoltage[18] ).append ( ";" ).append ( batteryVoltage[19] );
        stringBuilder = new StringBuilder ();
        StringBuilder batteryVoltage3 = stringBuilder.append ( batteryVoltage[20] ).append ( ";" ).append ( batteryVoltage[21] ).append ( ";" ).append ( batteryVoltage[22] ).append ( ";" ).append ( batteryVoltage[23] ).append ( ";" ).append ( batteryVoltage[24] ).append ( ";" ).append ( batteryVoltage[25] ).append ( ";" ).append ( batteryVoltage[26] ).append ( ";" ).append ( batteryVoltage[27] ).append ( ";" ).append ( batteryVoltage[28] ).append ( ";" ).append ( batteryVoltage[29] );
        stringBuilder = new StringBuilder ();
        StringBuilder batteryVoltage4 = stringBuilder.append ( batteryVoltage[30] ).append ( ";" ).append ( batteryVoltage[31] ).append ( ";" ).append ( batteryVoltage[32] ).append ( ";" ).append ( batteryVoltage[33] ).append ( ";" ).append ( batteryVoltage[34] ).append ( ";" ).append ( batteryVoltage[35] ).append ( ";" ).append ( batteryVoltage[36] ).append ( ";" ).append ( batteryVoltage[37] ).append ( ";" ).append ( batteryVoltage[38] ).append ( ";" ).append ( batteryVoltage[39] );
        stringBuilder = new StringBuilder ();
        StringBuilder batteryVoltage5 = stringBuilder.append ( batteryVoltage[40] ).append ( ";" ).append ( batteryVoltage[41] ).append ( ";" ).append ( batteryVoltage[42] ).append ( ";" ).append ( batteryVoltage[43] ).append ( ";" ).append ( batteryVoltage[44] ).append ( ";" ).append ( batteryVoltage[45] ).append ( ";" ).append ( batteryVoltage[46] ).append ( ";" ).append ( batteryVoltage[47] ).append ( ";" ).append ( batteryVoltage[48] ).append ( ";" ).append ( batteryVoltage[49] );
        stringBuilder = new StringBuilder ();
        StringBuilder batteryVoltage6 = stringBuilder.append ( batteryVoltage[50] ).append ( ";" ).append ( batteryVoltage[51] ).append ( ";" ).append ( batteryVoltage[52] ).append ( ";" ).append ( batteryVoltage[53] ).append ( ";" ).append ( batteryVoltage[54] ).append ( ";" ).append ( batteryVoltage[55] ).append ( ";" ).append ( batteryVoltage[56] ).append ( ";" ).append ( batteryVoltage[57] ).append ( ";" ).append ( batteryVoltage[58] ).append ( ";" ).append ( batteryVoltage[59] );
        stringBuilder = new StringBuilder ();
        StringBuilder batteryVoltage7 = stringBuilder.append ( batteryVoltage[60] ).append ( ";" ).append ( batteryVoltage[61] ).append ( ";" ).append ( batteryVoltage[62] ).append ( ";" ).append ( batteryVoltage[63] ).append ( ";" ).append ( batteryVoltage[64] ).append ( ";" ).append ( batteryVoltage[65] ).append ( ";" ).append ( batteryVoltage[66] ).append ( ";" ).append ( batteryVoltage[67] ).append ( ";" ).append ( batteryVoltage[68] ).append ( ";" ).append ( batteryVoltage[69] );
        stringBuilder = new StringBuilder ();
        StringBuilder batteryVoltage8 = stringBuilder.append ( batteryVoltage[70] ).append ( ";" ).append ( batteryVoltage[71] ).append ( ";" ).append ( batteryVoltage[72] ).append ( ";" ).append ( batteryVoltage[73] ).append ( ";" ).append ( batteryVoltage[74] ).append ( ";" ).append ( batteryVoltage[75] ).append ( ";" ).append ( batteryVoltage[76] ).append ( ";" ).append ( batteryVoltage[77] ).append ( ";" ).append ( batteryVoltage[78] ).append ( ";" ).append ( batteryVoltage[79] );
        stringBuilder = new StringBuilder ();
        StringBuilder batteryVoltage9 = stringBuilder.append ( batteryVoltage[80] ).append ( ";" ).append ( batteryVoltage[81] ).append ( ";" ).append ( batteryVoltage[82] ).append ( ";" ).append ( batteryVoltage[83] ).append ( ";" ).append ( batteryVoltage[84] ).append ( ";" ).append ( batteryVoltage[85] ).append ( ";" ).append ( batteryVoltage[86] ).append ( ";" ).append ( batteryVoltage[87] ).append ( ";" ).append ( batteryVoltage[88] ).append ( ";" ).append ( batteryVoltage[89] );
        stringBuilder = new StringBuilder ();
        StringBuilder batteryVoltage10 = stringBuilder.append ( batteryVoltage[90] ).append ( ";" ).append ( batteryVoltage[91] ).append ( ";" ).append ( batteryVoltage[92] ).append ( ";" ).append ( batteryVoltage[93] ).append ( ";" ).append ( batteryVoltage[94] ).append ( ";" ).append ( batteryVoltage[95] ).append ( ";" ).append ( batteryVoltage[96] ).append ( ";" ).append ( batteryVoltage[97] ).append ( ";" ).append ( batteryVoltage[98] ).append ( ";" ).append ( batteryVoltage[99] );
        stringBuilder = new StringBuilder ();
        StringBuilder batteryVoltage11 = stringBuilder.append ( batteryVoltage[100] ).append ( ";" ).append ( batteryVoltage[101] ).append ( ";" ).append ( batteryVoltage[102] ).append ( ";" ).append ( batteryVoltage[103] ).append ( ";" ).append ( batteryVoltage[104] ).append ( ";" ).append ( batteryVoltage[105] ).append ( ";" ).append ( batteryVoltage[106] ).append ( ";" ).append ( batteryVoltage[107] ).append ( ";" ).append ( batteryVoltage[108] ).append ( ";" ).append ( batteryVoltage[109] );
        stringBuilder = new StringBuilder ();
        StringBuilder batteryVoltage12 = stringBuilder.append ( batteryVoltage[110] ).append ( ";" ).append ( batteryVoltage[111] ).append ( ";" ).append ( batteryVoltage[112] ).append ( ";" ).append ( batteryVoltage[113] ).append ( ";" ).append ( batteryVoltage[114] ).append ( ";" ).append ( batteryVoltage[115] ).append ( ";" ).append ( batteryVoltage[116] ).append ( ";" ).append ( batteryVoltage[117] ).append ( ";" ).append ( batteryVoltage[118] ).append ( ";" ).append ( batteryVoltage[119] );
        stringBuilder = new StringBuilder ();
        StringBuilder batteryVoltage13 = stringBuilder.append ( batteryVoltage[120] ).append ( ";" ).append ( batteryVoltage[121] ).append ( ";" ).append ( batteryVoltage[122] ).append ( ";" ).append ( batteryVoltage[123] ).append ( ";" ).append ( batteryVoltage[124] ).append ( ";" ).append ( batteryVoltage[125] ).append ( ";" ).append ( batteryVoltage[126] ).append ( ";" ).append ( batteryVoltage[127] ).append ( ";" ).append ( batteryVoltage[128] ).append ( ";" ).append ( batteryVoltage[129] );
        stringBuilder = new StringBuilder ();
        StringBuilder batteryVoltage14 = stringBuilder.append ( batteryVoltage[130] ).append ( ";" ).append ( batteryVoltage[131] ).append ( ";" ).append ( batteryVoltage[132] ).append ( ";" ).append ( batteryVoltage[133] ).append ( ";" ).append ( batteryVoltage[134] ).append ( ";" ).append ( batteryVoltage[135] ).append ( ";" ).append ( batteryVoltage[136] ).append ( ";" ).append ( batteryVoltage[137] ).append ( ";" ).append ( batteryVoltage[138] ).append ( ";" ).append ( batteryVoltage[139] );
        stringBuilder = new StringBuilder ();
        StringBuilder batteryVoltage15 = stringBuilder.append ( batteryVoltage[140] ).append ( ";" ).append ( batteryVoltage[141] ).append ( ";" ).append ( batteryVoltage[142] ).append ( ";" ).append ( batteryVoltage[143] ).append ( ";" ).append ( batteryVoltage[144] ).append ( ";" ).append ( batteryVoltage[145] ).append ( ";" ).append ( batteryVoltage[146] ).append ( ";" ).append ( batteryVoltage[147] ).append ( ";" ).append ( batteryVoltage[148] ).append ( ";" ).append ( batteryVoltage[149] );
        stringBuilder = new StringBuilder ();
        StringBuilder batteryVoltage16 = stringBuilder.append ( batteryVoltage[150] ).append ( ";" ).append ( batteryVoltage[151] ).append ( ";" ).append ( batteryVoltage[152] ).append ( ";" ).append ( batteryVoltage[153] ).append ( ";" ).append ( batteryVoltage[154] ).append ( ";" ).append ( batteryVoltage[155] ).append ( ";" ).append ( batteryVoltage[156] ).append ( ";" ).append ( batteryVoltage[157] ).append ( ";" ).append ( batteryVoltage[158] ).append ( ";" ).append ( batteryVoltage[159] );
        stringBuilder = new StringBuilder ();
        StringBuilder batteryVoltage17 = stringBuilder.append ( batteryVoltage[160] ).append ( ";" ).append ( batteryVoltage[161] ).append ( ";" ).append ( batteryVoltage[162] ).append ( ";" ).append ( batteryVoltage[163] ).append ( ";" ).append ( batteryVoltage[164] ).append ( ";" ).append ( batteryVoltage[165] ).append ( ";" ).append ( batteryVoltage[166] ).append ( ";" ).append ( batteryVoltage[167] ).append ( ";" ).append ( batteryVoltage[168] ).append ( ";" ).append ( batteryVoltage[169] );
        stringBuilder = new StringBuilder ();
        StringBuilder batteryVoltage18 = stringBuilder.append ( batteryVoltage[170] ).append ( ";" ).append ( batteryVoltage[171] ).append ( ";" ).append ( batteryVoltage[172] ).append ( ";" ).append ( batteryVoltage[173] ).append ( ";" ).append ( batteryVoltage[174] ).append ( ";" ).append ( batteryVoltage[175] ).append ( ";" ).append ( batteryVoltage[176] ).append ( ";" ).append ( batteryVoltage[177] ).append ( ";" ).append ( batteryVoltage[178] ).append ( ";" ).append ( batteryVoltage[179] );
        stringBuilder = new StringBuilder ();
        StringBuilder batteryVoltage19 = stringBuilder.append ( batteryVoltage[180] ).append ( ";" ).append ( batteryVoltage[181] ).append ( ";" ).append ( batteryVoltage[182] ).append ( ";" ).append ( batteryVoltage[183] ).append ( ";" ).append ( batteryVoltage[184] ).append ( ";" ).append ( batteryVoltage[185] ).append ( ";" ).append ( batteryVoltage[186] ).append ( ";" ).append ( batteryVoltage[187] ).append ( ";" ).append ( batteryVoltage[188] ).append ( ";" ).append ( batteryVoltage[189] );
        stringBuilder = new StringBuilder ();
        StringBuilder batteryVoltage20 = stringBuilder.append ( batteryVoltage[190] ).append ( ";" ).append ( batteryVoltage[191] ).append ( ";" ).append ( batteryVoltage[192] ).append ( ";" ).append ( batteryVoltage[193] ).append ( ";" ).append ( batteryVoltage[194] ).append ( ";" ).append ( batteryVoltage[195] ).append ( ";" ).append ( batteryVoltage[196] ).append ( ";" ).append ( batteryVoltage[197] ).append ( ";" ).append ( batteryVoltage[198] ).append ( ";" ).append ( batteryVoltage[199] );
        stringBuilder = new StringBuilder ();
        StringBuilder batteryVoltage21 = stringBuilder.append ( batteryVoltage[200] ).append ( ";" ).append ( batteryVoltage[201] ).append ( ";" ).append ( batteryVoltage[202] ).append ( ";" ).append ( batteryVoltage[203] ).append ( ";" ).append ( batteryVoltage[204] ).append ( ";" ).append ( batteryVoltage[205] ).append ( ";" ).append ( batteryVoltage[206] ).append ( ";" ).append ( batteryVoltage[207] ).append ( ";" ).append ( batteryVoltage[208] ).append ( ";" ).append ( batteryVoltage[209] );
        stringBuilder = new StringBuilder ();
        StringBuilder batteryVoltage22 = stringBuilder.append ( batteryVoltage[210] ).append ( ";" ).append ( batteryVoltage[211] ).append ( ";" ).append ( batteryVoltage[212] ).append ( ";" ).append ( batteryVoltage[213] ).append ( ";" ).append ( batteryVoltage[214] ).append ( ";" ).append ( batteryVoltage[215] );
        batteryVoltageVo.setVoltage1 ( batteryVoltage1.toString () );
        batteryVoltageVo.setVoltage2 ( batteryVoltage2.toString () );
        batteryVoltageVo.setVoltage3 ( batteryVoltage3.toString () );
        batteryVoltageVo.setVoltage4 ( batteryVoltage4.toString () );
        batteryVoltageVo.setVoltage5 ( batteryVoltage5.toString () );
        batteryVoltageVo.setVoltage6 ( batteryVoltage6.toString () );
        batteryVoltageVo.setVoltage7 ( batteryVoltage7.toString () );
        batteryVoltageVo.setVoltage8 ( batteryVoltage8.toString () );
        batteryVoltageVo.setVoltage9 ( batteryVoltage9.toString () );
        batteryVoltageVo.setVoltage10 ( batteryVoltage10.toString () );
        batteryVoltageVo.setVoltage11 ( batteryVoltage11.toString () );
        batteryVoltageVo.setVoltage12 ( batteryVoltage12.toString () );
        batteryVoltageVo.setVoltage13 ( batteryVoltage13.toString () );
        batteryVoltageVo.setVoltage14 ( batteryVoltage14.toString () );
        batteryVoltageVo.setVoltage15 ( batteryVoltage15.toString () );
        batteryVoltageVo.setVoltage16 ( batteryVoltage16.toString () );
        batteryVoltageVo.setVoltage17 ( batteryVoltage17.toString () );
        batteryVoltageVo.setVoltage18 ( batteryVoltage18.toString () );
        batteryVoltageVo.setVoltage19 ( batteryVoltage19.toString () );
        batteryVoltageVo.setVoltage20 ( batteryVoltage20.toString () );
        batteryVoltageVo.setVoltage21 ( batteryVoltage21.toString () );
        batteryVoltageVo.setVoltage22 ( batteryVoltage22.toString () );
        return batteryVoltageVo;
    }

    /**
     * 处理电池电感温度
     *
     * @param batteryBoxVo
     * @return
     */
    public static BatteryTempVo parseBatterTemp ( BatteryBoxVo batteryBoxVo ) {
        log.info ( "温度->{}", Arrays.toString ( batteryBoxVo.getBatteryTemp () ) );
        String[] batteryTemp = batteryBoxVo.getBatteryTemp ();
        if (
                StringUtils.isBlank ( batteryTemp[0] ) && StringUtils.isBlank ( batteryTemp[1] ) && StringUtils.isBlank ( batteryTemp[2] ) && StringUtils.isBlank ( batteryTemp[3] ) && StringUtils.isBlank ( batteryTemp[4] ) &&
                        StringUtils.isBlank ( batteryTemp[5] ) && StringUtils.isBlank ( batteryTemp[6] ) && StringUtils.isBlank ( batteryTemp[7] ) && StringUtils.isBlank ( batteryTemp[8] ) &&
                        StringUtils.isBlank ( batteryTemp[9] ) && StringUtils.isBlank ( batteryTemp[10] ) && StringUtils.isBlank ( batteryTemp[11] ) && StringUtils.isBlank ( batteryTemp[12] ) &&
                        StringUtils.isBlank ( batteryTemp[13] ) && StringUtils.isBlank ( batteryTemp[14] ) && StringUtils.isBlank ( batteryTemp[15] ) && StringUtils.isBlank ( batteryTemp[16] ) && StringUtils.isBlank ( batteryTemp[17] ) && StringUtils.isBlank ( batteryTemp[18] ) &&
                        StringUtils.isBlank ( batteryTemp[19] ) && StringUtils.isBlank ( batteryTemp[20] ) && StringUtils.isBlank ( batteryTemp[21] ) && StringUtils.isBlank ( batteryTemp[22] ) && StringUtils.isBlank ( batteryTemp[23] ) && StringUtils.isBlank ( batteryTemp[24] ) &&
                        StringUtils.isBlank ( batteryTemp[25] ) && StringUtils.isBlank ( batteryTemp[26] ) && StringUtils.isBlank ( batteryTemp[27] ) && StringUtils.isBlank ( batteryTemp[28] ) && StringUtils.isBlank ( batteryTemp[29] ) && StringUtils.isBlank ( batteryTemp[30] ) &&
                        StringUtils.isBlank ( batteryTemp[31] ) && StringUtils.isBlank ( batteryTemp[32] ) && StringUtils.isBlank ( batteryTemp[33] ) && StringUtils.isBlank ( batteryTemp[34] ) && StringUtils.isBlank ( batteryTemp[35] ) && StringUtils.isBlank ( batteryTemp[36] ) &&
                        StringUtils.isBlank ( batteryTemp[37] ) && StringUtils.isBlank ( batteryTemp[38] ) && StringUtils.isBlank ( batteryTemp[39] ) && StringUtils.isBlank ( batteryTemp[40] ) && StringUtils.isBlank ( batteryTemp[41] ) && StringUtils.isBlank ( batteryTemp[42] ) &&
                        StringUtils.isBlank ( batteryTemp[43] ) && StringUtils.isBlank ( batteryTemp[44] ) && StringUtils.isBlank ( batteryTemp[45] ) && StringUtils.isBlank ( batteryTemp[46] ) && StringUtils.isBlank ( batteryTemp[47] ) && StringUtils.isBlank ( batteryTemp[48] ) &&
                        StringUtils.isBlank ( batteryTemp[49] ) && StringUtils.isBlank ( batteryTemp[50] ) && StringUtils.isBlank ( batteryTemp[51] ) && StringUtils.isBlank ( batteryTemp[52] ) && StringUtils.isBlank ( batteryTemp[53] ) && StringUtils.isBlank ( batteryTemp[54] ) &&
                        StringUtils.isBlank ( batteryTemp[55] ) && StringUtils.isBlank ( batteryTemp[56] ) && StringUtils.isBlank ( batteryTemp[57] ) && StringUtils.isBlank ( batteryTemp[58] ) && StringUtils.isBlank ( batteryTemp[59] ) ) {
            return null;
        }
        for ( int i = 0; i < batteryTemp.length; i++ ) {
            if ( StringUtils.isBlank ( batteryTemp[i] ) ) {
                batteryTemp[i] = "0";
            }
        }
        BatteryTempVo batteryTempVo = new BatteryTempVo ();
        StringBuilder stringBuilder = new StringBuilder ();
        StringBuilder batteryTemp1 = stringBuilder.append ( batteryTemp[0] ).append ( ";" ).append ( batteryTemp[1] ).append ( ";" ).append ( batteryTemp[2] ).append ( ";" ).append ( batteryTemp[3] ).append ( ";" ).append ( batteryTemp[4] ).append ( ";" ).append ( batteryTemp[5] ).append ( ";" ).append ( batteryTemp[6] ).append ( ";" ).append ( batteryTemp[7] ).append ( ";" ).append ( batteryTemp[8] ).append ( ";" ).append ( batteryTemp[9] );
        stringBuilder = new StringBuilder ();
        StringBuilder batteryTemp2 = stringBuilder.append ( batteryTemp[10] ).append ( ";" ).append ( batteryTemp[11] ).append ( ";" ).append ( batteryTemp[12] ).append ( ";" ).append ( batteryTemp[13] ).append ( ";" ).append ( batteryTemp[14] ).append ( ";" ).append ( batteryTemp[15] ).append ( ";" ).append ( batteryTemp[16] ).append ( ";" ).append ( batteryTemp[17] ).append ( ";" ).append ( batteryTemp[18] ).append ( ";" ).append ( batteryTemp[19] );
        stringBuilder = new StringBuilder ();
        StringBuilder batteryTemp3 = stringBuilder.append ( batteryTemp[20] ).append ( ";" ).append ( batteryTemp[21] ).append ( ";" ).append ( batteryTemp[22] ).append ( ";" ).append ( batteryTemp[23] ).append ( ";" ).append ( batteryTemp[24] ).append ( ";" ).append ( batteryTemp[25] ).append ( ";" ).append ( batteryTemp[26] ).append ( ";" ).append ( batteryTemp[27] ).append ( ";" ).append ( batteryTemp[28] ).append ( ";" ).append ( batteryTemp[29] );
        stringBuilder = new StringBuilder ();
        StringBuilder batteryTemp4 = stringBuilder.append ( batteryTemp[30] ).append ( ";" ).append ( batteryTemp[31] ).append ( ";" ).append ( batteryTemp[32] ).append ( ";" ).append ( batteryTemp[33] ).append ( ";" ).append ( batteryTemp[34] ).append ( ";" ).append ( batteryTemp[35] ).append ( ";" ).append ( batteryTemp[36] ).append ( ";" ).append ( batteryTemp[37] ).append ( ";" ).append ( batteryTemp[38] ).append ( ";" ).append ( batteryTemp[39] );
        stringBuilder = new StringBuilder ();
        StringBuilder batteryTemp5 = stringBuilder.append ( batteryTemp[40] ).append ( ";" ).append ( batteryTemp[41] ).append ( ";" ).append ( batteryTemp[42] ).append ( ";" ).append ( batteryTemp[43] ).append ( ";" ).append ( batteryTemp[44] ).append ( ";" ).append ( batteryTemp[45] ).append ( ";" ).append ( batteryTemp[46] ).append ( ";" ).append ( batteryTemp[47] ).append ( ";" ).append ( batteryTemp[48] ).append ( ";" ).append ( batteryTemp[49] );
        stringBuilder = new StringBuilder ();
        StringBuilder batteryTemp6 = stringBuilder.append ( batteryTemp[50] ).append ( ";" ).append ( batteryTemp[51] ).append ( ";" ).append ( batteryTemp[52] ).append ( ";" ).append ( batteryTemp[53] ).append ( ";" ).append ( batteryTemp[54] ).append ( ";" ).append ( batteryTemp[55] ).append ( ";" ).append ( batteryTemp[56] ).append ( ";" ).append ( batteryTemp[57] ).append ( ";" ).append ( batteryTemp[58] ).append ( ";" ).append ( batteryTemp[59] );
        batteryTempVo.setTemp1 ( batteryTemp1.toString () );
        batteryTempVo.setTemp2 ( batteryTemp2.toString () );
        batteryTempVo.setTemp3 ( batteryTemp3.toString () );
        batteryTempVo.setTemp4 ( batteryTemp4.toString () );
        batteryTempVo.setTemp5 ( batteryTemp5.toString () );
        batteryTempVo.setTemp6 ( batteryTemp6.toString () );
        return batteryTempVo;
    }


    /**
     * 处理PCS常规故障，根据测点Id添加对应故障
     *
     * @param alarmVos
     * @param id:测点Id，对应点表
     * @param deviceAddress：子设备地址
     * @param type：1:BMS；2        PCS
     * @return
     */
    private static List<AlarmVo> parseAlarm ( List<AlarmVo> alarmVos, int id, String deviceAddress, int type ) {
        AlarmVo alarmVo = new AlarmVo ();
        alarmVo.setAlarmTitle ( BMSEnum.getTitle ( id ) );
        alarmVo.setType ( type );
        alarmVo.setDeviceAddress ( String.valueOf ( HexUtil.hexToDecimal ( deviceAddress, 0, 2 ) ) );
        alarmVos.add ( alarmVo );
        return alarmVos;
    }

}
